Documentation ¶
Index ¶
Constants ¶
View Source
const ( Console = "console" File = "file" )
View Source
const ( DebugLevel int8 = iota - 1 InfoLevel WarnLevel ErrorLevel PanicLevel FatalLevel )
Variables ¶
View Source
var Writer io.Writer
Writer global root writer
Functions ¶
This section is empty.
Types ¶
type FileLog ¶
type FileLog struct { // non-zero value Path string `json:",omitempty"` Maxsize int `json:",omitempty"` MaxBackups int `json:",omitempty"` MaxAge int `json:",omitempty"` // zero val is valid Compress bool LocalZone bool //backup time zone }
FileLog config
type Log ¶
type Log struct { // non-zero value Type string `json:",omitempty"` // zero val is valid Level int8 File *FileLog `yaml:",omitempty"` }
Log config
type Logger ¶
type Logger interface { Debug(v ...interface{}) Debugf(format string, v ...interface{}) Info(v ...interface{}) Infof(format string, v ...interface{}) Warn(v ...interface{}) Warnf(format string, v ...interface{}) Error(v ...interface{}) Errorf(format string, v ...interface{}) Panic(v ...interface{}) Panicf(format string, v ...interface{}) Fatal(v ...interface{}) Fatalf(format string, v ...interface{}) }
Logger sugared logger interface
var SugaredLogger Logger
SugaredLogger global sugar logger provide based log print func
Click to show internal directories.
Click to hide internal directories.