Documentation ¶
Index ¶
- Constants
- func Close()
- func Debug(s string, fields ...Field)
- func Err(s string, fields ...Field)
- func Fatal(s string, fields ...Field)
- func Info(s string, fields ...Field)
- func Init(path string, level Level, encodingJson bool, callerSkip ...int) error
- func NewEncoding(encoding Encoding) string
- func NewLogLevel(level Level) zap.AtomicLevel
- func Warn(s string, fields ...Field)
- type Encoding
- type Field
- func Binary(key string, val []byte) Field
- func Bool(key string, val bool) Field
- func Bools(key string, bs []bool) Field
- func ByteString(key string, val []byte) Field
- func Error(key string, val error) Field
- func Errors(key string, val []error) Field
- func Float32(key string, val float32) Field
- func Float64(key string, val float64) Field
- func Int(key string, val int) Field
- func Int16(key string, val int16) Field
- func Int16s(key string, nums []int16) Field
- func Int32(key string, val int32) Field
- func Int32s(key string, nums []int32) Field
- func Int64(key string, val int64) Field
- func Int64s(key string, nums []int64) Field
- func Int8(key string, val int8) Field
- func Int8s(key string, nums []int8) Field
- func Ints(key string, nums []int) Field
- func String(key string, val string) Field
- func Strings(key string, ss []string) Field
- func Times(key string, ts []time.Time) Field
- func Uint(key string, val uint) Field
- func Uint16(key string, val uint16) Field
- func Uint16s(key string, nums []uint16) Field
- func Uint32(key string, val uint32) Field
- func Uint32s(key string, nums []uint32) Field
- func Uint64(key string, val uint64) Field
- func Uint64s(key string, nums []uint64) Field
- func Uint8(key string, val uint8) Field
- func Uint8s(key string, nums []uint8) Field
- func Uints(key string, nums []uint) Field
- type Level
- type Logger
- func (l *Logger) CloneWithCallerSkip(callerSkip int) *Logger
- func (l *Logger) Close()
- func (l *Logger) Debug(s string, fields ...Field)
- func (l *Logger) Err(s string, fields ...Field)
- func (l *Logger) Fatal(s string, fields ...Field)
- func (l *Logger) Info(s string, fields ...Field)
- func (l *Logger) Warn(s string, fields ...Field)
Constants ¶
View Source
const ( LevelInfo = LevelInformational LevelTrace = LevelDebug LevelWarn = LevelWarning )
Legacy log level constants to ensure backwards compatibility.
Variables ¶
This section is empty.
Functions ¶
func NewEncoding ¶
func NewLogLevel ¶
func NewLogLevel(level Level) zap.AtomicLevel
NewLogLevel is a convenience function that creates an AtomicLevel
Types ¶
type Field ¶
func ByteString ¶
Click to show internal directories.
Click to hide internal directories.