Documentation ¶
Index ¶
- Constants
- func Debug(f interface{}, v ...interface{})
- func Error(f interface{}, v ...interface{})
- func GetLOGDir() string
- func GetNewLogFile(dirPath string) *os.File
- func Info(f interface{}, v ...interface{})
- func InitLog(dir string)
- func Panic(f interface{}, v ...interface{})
- func Warning(f interface{}, v ...interface{})
- type LogLevel
- type LogOutType
- type LogWriter
- type Logger
- type MultiWriter
- type RotatingType
Constants ¶
View Source
const DefaultFileSize = 1 << 23 // 8m b/1024 kb/1024 m
View Source
const LogDir = "log"
View Source
const LogExtensionName = ".log"
Variables ¶
This section is empty.
Functions ¶
func GetNewLogFile ¶
Types ¶
type LogOutType ¶
type LogOutType string
outtype
const ( AdapterConsole LogOutType = "console" // 输出到控制台 AdapterFile LogOutType = "file" // 输出到文件 )
type MultiWriter ¶
func NewWriter ¶
func NewWriter(dirPath string) *MultiWriter
type RotatingType ¶
type RotatingType int
const ( TimeRotate RotatingType = iota + 1 // 每隔多长时间回滚 SizeRotate // 固定大小回滚 )
Click to show internal directories.
Click to hide internal directories.