Documentation ¶
Index ¶
- type Config
- type Logger
- func (l *Logger) Debug(msg string, keysAndValues ...interface{}) log.Logger
- func (l *Logger) Error(msg string, keysAndValues ...interface{}) log.Logger
- func (l *Logger) Fatal(msg string, keysAndValues ...interface{}) log.Logger
- func (l *Logger) Info(msg string, keysAndValues ...interface{}) log.Logger
- func (l *Logger) Panic(msg string, keysAndValues ...interface{}) log.Logger
- func (l Logger) Sync() error
- func (l *Logger) Warn(msg string, keysAndValues ...interface{}) log.Logger
- func (l Logger) With(args ...interface{}) log.Logger
- func (l Logger) WithComponent(component string) log.Logger
- func (l Logger) WithError(err error) log.Logger
- func (l *Logger) Write(p []byte) (n int, err error)
- type LoggerFormat
- type LoggerLevel
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Level LoggerLevel Format LoggerFormat }
func NewConfig ¶
func NewConfig(level LoggerLevel, format LoggerFormat) *Config
type LoggerFormat ¶
type LoggerFormat string
const ( TextFormat LoggerFormat = "text" JSONFormat LoggerFormat = "json" )
type LoggerLevel ¶
type LoggerLevel string
const ( InfoLevel LoggerLevel = "info" ErrorLevel LoggerLevel = "error" DebugLevel LoggerLevel = "debug" WarnLevel LoggerLevel = "warn" PanicLevel LoggerLevel = "panic" )
Click to show internal directories.
Click to hide internal directories.