Documentation ¶
Index ¶
- Constants
- func CPrint(level uint32, msg string, formats ...LogFormat)
- func GetGID() uint64
- func Init(path, filename string, level string, age uint32, disableCPrint bool)
- func LoadFunctionHooker(logger *Logger)
- func NewFileRotateHooker(path, filename string, age uint32, formatter logrus.Formatter) logrus.Hook
- func VPrint(level uint32, msg string, formats ...LogFormat)
- type LogFormat
- type Logger
Constants ¶
View Source
const ( PanicLevel = "panic" FatalLevel = "fatal" ErrorLevel = "error" WarnLevel = "warn" InfoLevel = "info" DebugLevel = "debug" TraceLevel = "trace" )
const
View Source
const ( //PANIC log level PANIC uint32 = iota //FATAL has list msg FATAL //ERROR has list msg ERROR //WARN only log WARN //INFO only log INFO //DEBUG only log DEBUG //TRACE only log TRACE )
View Source
const ( //MsgFormatSingle use info MsgFormatSingle uint32 = iota //MsgFormatMulti use show all func call relation MsgFormatMulti )
Variables ¶
This section is empty.
Functions ¶
func LoadFunctionHooker ¶
func LoadFunctionHooker(logger *Logger)
LoadFunctionHooker loads a function hooker to the logger
func NewFileRotateHooker ¶
NewFileRotateHooker enable log file output
Types ¶
Click to show internal directories.
Click to hide internal directories.