Documentation
¶
Index ¶
- Constants
- func Debug(msg string)
- func Debugf(msg string, args ...interface{})
- func Debugw(msg string, keysAndValues ...interface{})
- func Error(msg string)
- func Errorf(msg string, args ...interface{})
- func Errorw(msg string, keysAndValues ...interface{})
- func Fatal(args ...interface{})
- func Fatalf(template string, args ...interface{})
- func Fatalw(msg string, keysAndValues ...interface{})
- func Info(msg string)
- func Infof(msg string, args ...interface{})
- func Infow(msg string, keysAndValues ...interface{})
- func Init(config *Config)
- func NewLogger(conf *Config) *zap.Logger
- func NewSugaredLogger(conf *Config) *zap.SugaredLogger
- func NewkvEncoder(cfg zapcore.EncoderConfig) *kvEncoder
- func Panic(args ...interface{})
- func Panicf(template string, args ...interface{})
- func Panicw(msg string, keysAndValues ...interface{})
- func Warn(msg string)
- func Warnf(msg string, args ...interface{})
- func Warnw(msg string, keysAndValues ...interface{})
- type CommonEncoder
- func (enc CommonEncoder) AddArray(key string, arr zapcore.ArrayMarshaler) error
- func (enc CommonEncoder) AddBinary(key string, val []byte)
- func (enc CommonEncoder) AddBool(key string, val bool)
- func (enc CommonEncoder) AddByteString(key string, val []byte)
- func (enc CommonEncoder) AddComplex128(k string, v complex128)
- func (enc CommonEncoder) AddComplex64(k string, v complex64)
- func (enc CommonEncoder) AddDuration(key string, val time.Duration)
- func (enc CommonEncoder) AddFloat32(key string, val float32)
- func (enc CommonEncoder) AddFloat64(key string, val float64)
- func (enc CommonEncoder) AddInt(k string, v int)
- func (enc CommonEncoder) AddInt16(k string, v int16)
- func (enc CommonEncoder) AddInt32(k string, v int32)
- func (enc CommonEncoder) AddInt64(key string, val int64)
- func (enc CommonEncoder) AddInt8(k string, v int8)
- func (enc CommonEncoder) AddObject(key string, obj zapcore.ObjectMarshaler) error
- func (enc CommonEncoder) AddReflected(key string, obj interface{}) error
- func (enc CommonEncoder) AddString(key, val string)
- func (enc CommonEncoder) AddTime(key string, val time.Time)
- func (enc CommonEncoder) AddUint(k string, v uint)
- func (enc CommonEncoder) AddUint16(k string, v uint16)
- func (enc CommonEncoder) AddUint32(k string, v uint32)
- func (enc CommonEncoder) AddUint64(key string, val uint64)
- func (enc CommonEncoder) AddUint8(k string, v uint8)
- func (enc CommonEncoder) AddUintptr(k string, v uintptr)
- func (enc CommonEncoder) AppendArray(arr zapcore.ArrayMarshaler) error
- func (enc CommonEncoder) AppendBool(val bool)
- func (enc CommonEncoder) AppendByteString(val []byte)
- func (enc CommonEncoder) AppendComplex128(v complex128)
- func (enc CommonEncoder) AppendComplex64(v complex64)
- func (enc CommonEncoder) AppendDuration(val time.Duration)
- func (enc CommonEncoder) AppendFloat32(v float32)
- func (enc CommonEncoder) AppendFloat64(v float64)
- func (enc CommonEncoder) AppendInt(v int)
- func (enc CommonEncoder) AppendInt16(v int16)
- func (enc CommonEncoder) AppendInt32(v int32)
- func (enc CommonEncoder) AppendInt64(val int64)
- func (enc CommonEncoder) AppendInt8(v int8)
- func (enc CommonEncoder) AppendObject(obj zapcore.ObjectMarshaler) error
- func (enc CommonEncoder) AppendReflected(val interface{}) error
- func (enc CommonEncoder) AppendString(val string)
- func (enc CommonEncoder) AppendTime(val time.Time)
- func (enc CommonEncoder) AppendUint(v uint)
- func (enc CommonEncoder) AppendUint16(v uint16)
- func (enc CommonEncoder) AppendUint32(v uint32)
- func (enc CommonEncoder) AppendUint64(val uint64)
- func (enc CommonEncoder) AppendUint8(v uint8)
- func (enc CommonEncoder) AppendUintptr(v uintptr)
- func (enc CommonEncoder) Clone() zapcore.Encoder
- func (c CommonEncoder) EncodeEntry(ent zapcore.Entry, fields []zapcore.Field) (*buffer.Buffer, error)
- func (enc CommonEncoder) OpenNamespace(key string)
- type Config
- type RotateConfig
Constants ¶
View Source
const ( DebugLevel = iota - 1 InfoLevel WarnLevel ErrorLevel RotateMaxSize = 300 RotateMaxAge = 7 RotateMaxBackups = 15 )
Variables ¶
This section is empty.
Functions ¶
func NewSugaredLogger ¶
func NewSugaredLogger(conf *Config) *zap.SugaredLogger
func NewkvEncoder ¶
func NewkvEncoder(cfg zapcore.EncoderConfig) *kvEncoder
Types ¶
type CommonEncoder ¶ added in v1.0.4
type CommonEncoder struct {
// contains filtered or unexported fields
}
func NewCommonEncoder ¶ added in v1.0.4
func NewCommonEncoder(cfg zapcore.EncoderConfig) *CommonEncoder
func (CommonEncoder) AddArray ¶ added in v1.0.4
func (enc CommonEncoder) AddArray(key string, arr zapcore.ArrayMarshaler) error
func (CommonEncoder) AddByteString ¶ added in v1.0.4
func (CommonEncoder) AddComplex128 ¶ added in v1.0.4
func (enc CommonEncoder) AddComplex128(k string, v complex128)
func (CommonEncoder) AddComplex64 ¶ added in v1.0.4
func (CommonEncoder) AddDuration ¶ added in v1.0.4
func (CommonEncoder) AddFloat32 ¶ added in v1.0.4
func (CommonEncoder) AddFloat64 ¶ added in v1.0.4
func (CommonEncoder) AddObject ¶ added in v1.0.4
func (enc CommonEncoder) AddObject(key string, obj zapcore.ObjectMarshaler) error
func (CommonEncoder) AddReflected ¶ added in v1.0.4
func (CommonEncoder) AddString ¶ added in v1.0.4
func (enc CommonEncoder) AddString(key, val string)
func (CommonEncoder) AddUintptr ¶ added in v1.0.4
func (CommonEncoder) AppendArray ¶ added in v1.0.4
func (enc CommonEncoder) AppendArray(arr zapcore.ArrayMarshaler) error
func (CommonEncoder) AppendBool ¶ added in v1.0.4
func (enc CommonEncoder) AppendBool(val bool)
func (CommonEncoder) AppendByteString ¶ added in v1.0.4
func (enc CommonEncoder) AppendByteString(val []byte)
func (CommonEncoder) AppendComplex128 ¶ added in v1.0.4
func (enc CommonEncoder) AppendComplex128(v complex128)
func (CommonEncoder) AppendComplex64 ¶ added in v1.0.4
func (enc CommonEncoder) AppendComplex64(v complex64)
func (CommonEncoder) AppendDuration ¶ added in v1.0.4
func (CommonEncoder) AppendFloat32 ¶ added in v1.0.4
func (enc CommonEncoder) AppendFloat32(v float32)
func (CommonEncoder) AppendFloat64 ¶ added in v1.0.4
func (enc CommonEncoder) AppendFloat64(v float64)
func (CommonEncoder) AppendInt16 ¶ added in v1.0.4
func (enc CommonEncoder) AppendInt16(v int16)
func (CommonEncoder) AppendInt32 ¶ added in v1.0.4
func (enc CommonEncoder) AppendInt32(v int32)
func (CommonEncoder) AppendInt64 ¶ added in v1.0.4
func (enc CommonEncoder) AppendInt64(val int64)
func (CommonEncoder) AppendInt8 ¶ added in v1.0.4
func (enc CommonEncoder) AppendInt8(v int8)
func (CommonEncoder) AppendObject ¶ added in v1.0.4
func (enc CommonEncoder) AppendObject(obj zapcore.ObjectMarshaler) error
func (CommonEncoder) AppendReflected ¶ added in v1.0.4
func (enc CommonEncoder) AppendReflected(val interface{}) error
func (CommonEncoder) AppendString ¶ added in v1.0.4
func (enc CommonEncoder) AppendString(val string)
func (CommonEncoder) AppendTime ¶ added in v1.0.4
func (CommonEncoder) AppendUint ¶ added in v1.0.4
func (enc CommonEncoder) AppendUint(v uint)
func (CommonEncoder) AppendUint16 ¶ added in v1.0.4
func (enc CommonEncoder) AppendUint16(v uint16)
func (CommonEncoder) AppendUint32 ¶ added in v1.0.4
func (enc CommonEncoder) AppendUint32(v uint32)
func (CommonEncoder) AppendUint64 ¶ added in v1.0.4
func (enc CommonEncoder) AppendUint64(val uint64)
func (CommonEncoder) AppendUint8 ¶ added in v1.0.4
func (enc CommonEncoder) AppendUint8(v uint8)
func (CommonEncoder) AppendUintptr ¶ added in v1.0.4
func (enc CommonEncoder) AppendUintptr(v uintptr)
func (CommonEncoder) EncodeEntry ¶ added in v1.0.4
func (CommonEncoder) OpenNamespace ¶ added in v1.0.4
func (enc CommonEncoder) OpenNamespace(key string)
Directories
¶
Path | Synopsis |
---|---|
Package bufferpool houses zap's shared internal buffer pool.
|
Package bufferpool houses zap's shared internal buffer pool. |
Package pool provides internal pool utilities.
|
Package pool provides internal pool utilities. |
Click to show internal directories.
Click to hide internal directories.