Documentation ¶
Index ¶
- Variables
- func Critical(f interface{}, v ...interface{})
- func Debug(f interface{}, v ...interface{})
- func Error(f interface{}, v ...interface{})
- func Info(f interface{}, v ...interface{})
- func Notice(f interface{}, v ...interface{})
- func Warning(f interface{}, v ...interface{})
- type FileLoggerConfig
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Logger = logs.NewLogger(10000) //初始化日志变量(缓存大小为10000) Alertloger = logs.NewLogger(10000) Originloger = logs.NewLogger(10000) Panic = logs.NewLogger(10000) )
log的简单用法:1 NewLogger 2SetLogger设置logger 3就直接能用了,如log.Debug()等
View Source
var ( // default log dir LogDir = "log" // log to file config // log file will auto rotate, keeping logs for last two weeks DefaultFileLoggerConfig = FileLoggerConfig{ Filename: "log/alert-gateway.log", MaxFiles: 14, MaxSize: 1 << 26, Daily: true, MaxDays: 14, Rotate: true, Level: logs.LevelTrace, } )
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.