Documentation
¶
Index ¶
- Variables
- type Default
- type Level
- type Logrus
- type SimpleLogger
- type Wrapper
- type ZapSugar
- func (f *ZapSugar) Debugf(v ...interface{})
- func (f *ZapSugar) Errorf(v ...interface{})
- func (f *ZapSugar) Fatalf(v ...interface{})
- func (f *ZapSugar) Infof(v ...interface{})
- func (f *ZapSugar) Panicf(v ...interface{})
- func (f *ZapSugar) Println(v ...interface{})
- func (f *ZapSugar) Warnf(v ...interface{})
Constants ¶
This section is empty.
Variables ¶
View Source
var StringToLevel = map[string]Level{ "debug": DebugLevel, "info": InfoLevel, "warn": WarnLevel, "error": ErrorLevel, "panic": PanicLevel, "fatal": FatalLevel, }
StringToStatusType converts string to status
Functions ¶
This section is empty.
Types ¶
type Default ¶
func NewDefault ¶
type Level ¶
type Level int8
const ( // DebugLevel logs are typically voluminous, and are usually disabled in // production. DebugLevel Level = iota - 1 // InfoLevel is the default logging priority. InfoLevel // WarnLevel logs are more important than Info, but don't need individual // human review. WarnLevel // ErrorLevel logs are high-priority. If an application is running smoothly, // it shouldn't generate any error-level logs. ErrorLevel // DPanicLevel logs are particularly important errors. In development the // logger panics after writing the message. DPanicLevel // PanicLevel logs a message, then panics. PanicLevel // FatalLevel logs a message, then calls os.Exit(1). FatalLevel )
type SimpleLogger ¶
type SimpleLogger interface { Println(v ...interface{}) Debugf(v ...interface{}) Infof(v ...interface{}) Warnf(v ...interface{}) Errorf(v ...interface{}) Panicf(v ...interface{}) Fatalf(v ...interface{}) }
func NewLogrus ¶
func NewLogrus(dst ...string) (SimpleLogger, error)
type Wrapper ¶
type Wrapper struct { Log SimpleLogger Prefix []interface{} Level Level }
type ZapSugar ¶
type ZapSugar struct { Logger *zap.SugaredLogger // contains filtered or unexported fields }
func NewZapConsole ¶
func NewZapSyslog ¶
Click to show internal directories.
Click to hide internal directories.