Documentation ¶
Index ¶
- Variables
- func AsyncInfo(msg string, args ...interface{})
- func Debug(msg string, args ...interface{})
- func Error(err error)
- func Errors(msg string, args ...interface{})
- func FormateLog(args []interface{}) *zap.Logger
- func Info(msg string, args ...interface{})
- func Panic(msg string, args ...interface{})
- func ToJsonData(args []interface{}) zap.Field
- func Warn(msg string, args ...interface{})
- type New
Constants ¶
This section is empty.
Variables ¶
View Source
var Write *zap.Logger
Write Inherit zap log
Functions ¶
Types ¶
type New ¶
type New struct { Path string //Save Path Level string //Set log level,info debug warn MaxBackups int //Keep 30 backups, 300 by default MaxSize int //Each log file saves 10M, the default is 10M MaxAge int //7 days reserved, 30 days by default Compress bool //Whether to compress, no compression by default ServiceName string //Log service name, default Ginp }
New Log parameter structure
var Create New
Create 默认调用
func (*New) SetMaxBackups ¶
SetMaxBackups setting log
func (*New) SetServiceName ¶
SetServiceName setting log
Click to show internal directories.
Click to hide internal directories.