Documentation ¶
Index ¶
- func Debug(ctx context.Context, msg string, fields ...Field)
- func DebugEnabled(ctx context.Context) bool
- func Err(ctx context.Context, msg string, fields ...Field)
- func ErrorEnabled(ctx context.Context) bool
- func Fatal(ctx context.Context, msg string, fields ...Field)
- func Handler(l *Log) func(http.Handler) http.Handler
- func Info(ctx context.Context, msg string, fields ...Field)
- func InfoEnabled(ctx context.Context) bool
- func MillisecondDurationEncoder(d time.Duration, enc zapcore.PrimitiveArrayEncoder)
- func NewConfig() zap.Config
- func NewEncoderConfig() zapcore.EncoderConfig
- func UTCTimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder)
- func Warn(ctx context.Context, msg string, fields ...Field)
- func WarnEnabled(ctx context.Context) bool
- func WithFields(ctx context.Context, fields ...Field) context.Context
- type Field
- func Any(key string, val interface{}) Field
- func Binary(key string, val []byte) Field
- func Bool(key string, val bool) Field
- func Boolp(key string, val *bool) Field
- func Bools(key string, bb []bool) Field
- func ByteString(key string, val []byte) Field
- func Duration(key string, val time.Duration) Field
- func Durationp(key string, val *time.Duration) Field
- func Error(err error) Field
- func Errors(key string, errs []error) Field
- func Float32(key string, val float32) Field
- func Float32p(key string, val *float32) Field
- func Float64(key string, val float64) Field
- func Float64p(key string, val *float64) Field
- func Int(key string, val int) Field
- func Int16(key string, val int16) Field
- func Int16p(key string, val *int16) Field
- func Int16s(key string, ints []int16) Field
- func Int32(key string, val int32) Field
- func Int32p(key string, val *int32) Field
- func Int32s(key string, ints []int32) Field
- func Int64(key string, val int64) Field
- func Int64s(key string, ints []int64) Field
- func Int8(key string, val int8) Field
- func Int8p(key string, val *int8) Field
- func Int8s(key string, ints []int8) Field
- func Intp(key string, val *int) Field
- func Ints(key string, ints []int) Field
- func NamedError(key string, err error) Field
- func Object(key string, m zapcore.ObjectMarshaler) Field
- func Reflect(key string, val interface{}) Field
- func Skip() Field
- func Stack(key string) Field
- func String(key, val string) Field
- func Stringer(key string, val fmt.Stringer) Field
- func Stringp(key string, val *string) Field
- func Strings(key string, ss []string) Field
- func Time(key string, val time.Time) Field
- func Timep(key string, val *time.Time) Field
- func Times(key string, ts []time.Time) Field
- func UInt16s(key string, ints []uint16) Field
- func UInt32s(key string, ints []uint32) Field
- func UInt64s(key string, ints []uint64) Field
- func UInt8s(key string, ints []uint8) Field
- func UInts(key string, ints []uint) Field
- func Uint(key string, val uint) Field
- func Uint16(key string, val uint16) Field
- func Uint32(key string, val uint32) Field
- func Uint32p(key string, val *uint32) Field
- func Uint64(key string, val uint64) Field
- func Uint64p(key string, val *uint64) Field
- func Uint8(key string, val uint8) Field
- func Uint8p(key string, val *uint8) Field
- func Uintp(key string, val *uint) Field
- type Log
- func (l *Log) Close()
- func (l *Log) Debug(msg string, fields ...Field)
- func (l *Log) DebugEnabled() bool
- func (l *Log) Error(msg string, fields ...Field)
- func (l *Log) ErrorEnabled() bool
- func (l *Log) Fatal(msg string, fields ...Field)
- func (l *Log) Info(msg string, fields ...Field)
- func (l *Log) InfoEnabled() bool
- func (l *Log) Inject(ctx context.Context) context.Context
- func (l *Log) Named(s string) *Log
- func (l *Log) Warn(msg string, fields ...Field)
- func (l *Log) WarnEnabled() bool
- func (l *Log) With(fields ...Field) *Log
- func (l *Log) WithCallerSkip(skip int) *Log
- func (l *Log) Z() *zap.Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DebugEnabled ¶
func ErrorEnabled ¶
func InfoEnabled ¶
func MillisecondDurationEncoder ¶
func MillisecondDurationEncoder(d time.Duration, enc zapcore.PrimitiveArrayEncoder)
SecondsDurationEncoder serializes a time.Duration to a floating-point number of seconds elapsed.
func NewEncoderConfig ¶
func NewEncoderConfig() zapcore.EncoderConfig
func UTCTimeEncoder ¶
func UTCTimeEncoder(t time.Time, enc zapcore.PrimitiveArrayEncoder)
func WarnEnabled ¶
Types ¶
type Field ¶
type Field struct {
// contains filtered or unexported fields
}
func ByteString ¶
func NamedError ¶
type Log ¶
type Log struct {
// contains filtered or unexported fields
}
func (*Log) DebugEnabled ¶
func (*Log) ErrorEnabled ¶
func (*Log) InfoEnabled ¶
func (*Log) WarnEnabled ¶
func (*Log) WithCallerSkip ¶
Click to show internal directories.
Click to hide internal directories.