Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
//ENV 环境变量前缀,默认空
ENV = ""
)
Functions ¶
This section is empty.
Types ¶
type Logger ¶
type Logger interface {
// Printf calls l.Output to print to the logger.
// Arguments are handled in the manner of fmt.Printf.
Printf(format string, v ...interface{})
// Print calls l.Output to print to the logger.
// Arguments are handled in the manner of fmt.Print.
Print(v ...interface{})
// Println calls l.Output to print to the logger.
// Arguments are handled in the manner of fmt.Println.
Println(v ...interface{})
// Warnf calls l.Output to print to the logger.
// Arguments are handled in the manner of fmt.Printf.
Warnf(format string, v ...interface{})
// Warn calls l.Output to print to the logger.
// Arguments are handled in the manner of fmt.Print.
Warn(v ...interface{})
// Warnln calls l.Output to print to the logger.
// Arguments are handled in the manner of fmt.Println.
Warnln(v ...interface{})
// Errorf calls l.Output to print to the logger.
// Arguments are handled in the manner of fmt.Printf.
Errorf(format string, v ...interface{})
// Error calls l.Output to print to the logger.
// Arguments are handled in the manner of fmt.Print.
Error(v ...interface{})
// Errorln calls l.Output to print to the logger.
// Arguments are handled in the manner of fmt.Println.
Errorln(v ...interface{})
// Fatalf calls l.Output to print to the logger.
// Arguments are handled in the manner of fmt.Printf.
Fatalf(format string, v ...interface{})
// Fatal calls l.Output to print to the logger.
// Arguments are handled in the manner of fmt.Print.
Fatal(v ...interface{})
// Fatalln calls l.Output to print to the logger.
// Arguments are handled in the manner of fmt.Println.
Fatalln(v ...interface{})
SetLevel(l Level)
//OnMessageOutput 消息输出回调
OnMessageOutput(func(msg string))
}
Logger provides a convenient interface for logging
Click to show internal directories.
Click to hide internal directories.