Documentation ¶
Index ¶
- Constants
- func ConsoleEncoding() *logger
- func Debug(msg string, keyAndValues ...interface{})
- func Enable() *logger
- func Error(msg string, keyAndValues ...interface{})
- func Fatal(msg string, keyAndValues ...interface{})
- func Info(msg string, keyAndValues ...interface{})
- func Level(level int8) *logger
- func New(name string) *logger
- func Panic(msg string, keyAndValues ...interface{})
- func Warn(msg string, keyAndValues ...interface{})
- func WithConsole() *logger
- func WithFile(path string) *logger
- func WithWriter(w io.Writer) *logger
Constants ¶
View Source
const ( DebugLevel int8 = iota - 1 InfoLevel WarnLevel ErrorLevel PanicLevel FatalLevel )
Variables ¶
This section is empty.
Functions ¶
func ConsoleEncoding ¶
func ConsoleEncoding() *logger
ConsoleEncoding EncodeConsole sets the encoding `console` of logger. The default encoding is `json`.
func Level ¶
func Level(level int8) *logger
Level sets the level of logger. The default level is `Info`.
func WithConsole ¶
func WithConsole() *logger
func WithWriter ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.