Documentation ¶
Overview ¶
log defines a logging intefrace and wraps uber-go/zap logger
log defines a logging intefrace and wraps uber-go/zap logger
Index ¶
- Constants
- func Any(key string, val interface{}) zap.Field
- func Bool(key string, val bool) zap.Field
- func ByteString(key string, val []byte) zap.Field
- func Debug(msg string, i ...zap.Field)
- func Duration(key string, val time.Duration) zap.Field
- func Err(val error) zap.Field
- func Error(msg string, i ...zap.Field)
- func Fatal(msg string, i ...zap.Field)
- func Info(msg string, i ...zap.Field)
- func Int(key string, val int) zap.Field
- func Int64(key string, val int64) zap.Field
- func IsConsole() bool
- func IsJson() bool
- func Log(level zapcore.Level, msg string, i ...zap.Field)
- func Print(msg string, i ...zap.Field)
- func String(key string, val string) zap.Field
- func Strings(key string, val []string) zap.Field
- func Time(key string, val time.Time) zap.Field
- func Warn(msg string, i ...zap.Field)
- type Field
- type Level
- type Logger
- func (l *Logger) Debug(msg string, i ...zap.Field)
- func (l *Logger) Error(msg string, i ...zap.Field)
- func (l *Logger) Fatal(msg string, i ...zap.Field)
- func (l *Logger) Info(msg string, i ...zap.Field)
- func (l *Logger) Log(level zapcore.Level, msg string, i ...zap.Field)
- func (l *Logger) Print(msg string, i ...zap.Field)
- func (l *Logger) SetLevel(level zapcore.Level)
- func (l *Logger) Warn(msg string, i ...zap.Field)
- func (l *Logger) With(fields ...zap.Field) *Logger
- func (l *Logger) WithOptions(opts ...zap.Option) *Logger
Constants ¶
View Source
const ( // PanicLevel logs message and then calls `panic“ PanicLevel = zap.PanicLevel // FatalLevel logs and then calls `os.Exit(1)`. It will exit even if the // logging level is set to Panic. FatalLevel = zap.FatalLevel // ErrorLevel should be used for any error ErrorLevel = zap.ErrorLevel // WarnLevel to be used on non-erroneous cases that could however be undesired WarnLevel = zap.WarnLevel // InfoLevel to be used for output directed at the user InfoLevel = zap.InfoLevel // DebugLevel to only be enabled when debugging DebugLevel = zap.DebugLevel )
Variables ¶
This section is empty.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.