Documentation
¶
Index ¶
- func AppendField(key string, value interface{})
- func Debug(args ...interface{})
- func Debugf(msg string, args ...interface{})
- func Error(args ...interface{})
- func Errorf(msg string, args ...interface{})
- func Fatal(args ...interface{})
- func Fatalf(msg string, args ...interface{})
- func Info(args ...interface{})
- func Infof(msg string, args ...interface{})
- func Panic(args ...interface{})
- func Panicf(msg string, args ...interface{})
- func Setup(f Factory) error
- func Warn(args ...interface{})
- func Warnf(msg string, args ...interface{})
- type Factory
- type Level
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Factory ¶
type Factory interface { Create(map[string]interface{}) Logger CreateSub(Logger, map[string]interface{}) Logger }
Factory interface defines the interface that we have to provide in order to use this abstraction
type Level ¶
type Level string
The Level type definition.
const ( // DebugLevel level. DebugLevel Level = "debug" // InfoLevel level. InfoLevel Level = "info" // WarnLevel level. WarnLevel Level = "warn" // ErrorLevel level. ErrorLevel Level = "error" // FatalLevel level. FatalLevel Level = "fatal" // PanicLevel level. PanicLevel Level = "panic" // NoLevel level. NoLevel Level = "" )
type Logger ¶
type Logger interface { Level() Level Fields() map[string]interface{} Fatal(...interface{}) Fatalf(string, ...interface{}) Panic(...interface{}) Panicf(string, ...interface{}) Error(...interface{}) Errorf(string, ...interface{}) Warn(...interface{}) Warnf(string, ...interface{}) Info(...interface{}) Infof(string, ...interface{}) Debug(...interface{}) Debugf(string, ...interface{}) }
Logger interface defines all methods a logger has to implement for this abstraction
Click to show internal directories.
Click to hide internal directories.