zapbox

package
v0.1.1-docker Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewEncoder

func NewEncoder(verbosity int) zapcore.Encoder

func WithLevel

func WithLevel(level zapcore.Level) zap.Option

WithLevel returns a new context derived from ctx that has a logger that only logs messages at or above the given level.

*Important!* This does not work with all underlying core

implementation. See https://github.com/uber-go/zap/issues/581#issuecomment-600641485
for details.

Types

type CLILogger

type CLILogger struct {
	// contains filtered or unexported fields
}

CLILogger wraps a `zap.Logger` pointer and offers only a printf like interface

func NewCLILogger

func NewCLILogger(base *zap.Logger) *CLILogger

func (*CLILogger) Debug

func (l *CLILogger) Debug(msg string, fields ...zapcore.Field)

func (*CLILogger) Error

func (l *CLILogger) Error(msg string, fields ...zapcore.Field)

func (*CLILogger) FatalAppError

func (l *CLILogger) FatalAppError(app string, err error)

func (*CLILogger) LoggerReference

func (l *CLILogger) LoggerReference() **zap.Logger

func (*CLILogger) Printf

func (l *CLILogger) Printf(template string, args ...interface{})

func (*CLILogger) ReconfigureReference

func (l *CLILogger) ReconfigureReference()

func (*CLILogger) Warn

func (l *CLILogger) Warn(msg string, fields ...zapcore.Field)

type Encoder

type Encoder struct {
	// contains filtered or unexported fields
}

func (Encoder) AddArray

func (enc Encoder) AddArray(key string, arr zapcore.ArrayMarshaler) error

func (Encoder) AddBinary

func (enc Encoder) AddBinary(key string, val []byte)

func (Encoder) AddBool

func (enc Encoder) AddBool(key string, val bool)

func (Encoder) AddByteString

func (enc Encoder) AddByteString(key string, val []byte)

func (Encoder) AddComplex128

func (enc Encoder) AddComplex128(key string, val complex128)

func (Encoder) AddComplex64

func (enc Encoder) AddComplex64(k string, v complex64)

func (Encoder) AddDuration

func (enc Encoder) AddDuration(key string, val time.Duration)

func (Encoder) AddFloat32

func (enc Encoder) AddFloat32(k string, v float32)

func (Encoder) AddFloat64

func (enc Encoder) AddFloat64(key string, val float64)

func (Encoder) AddInt

func (enc Encoder) AddInt(k string, v int)

func (Encoder) AddInt16

func (enc Encoder) AddInt16(k string, v int16)

func (Encoder) AddInt32

func (enc Encoder) AddInt32(k string, v int32)

func (Encoder) AddInt64

func (enc Encoder) AddInt64(key string, val int64)

func (Encoder) AddInt8

func (enc Encoder) AddInt8(k string, v int8)

func (Encoder) AddObject

func (enc Encoder) AddObject(key string, obj zapcore.ObjectMarshaler) error

func (Encoder) AddReflected

func (enc Encoder) AddReflected(key string, obj interface{}) error

func (Encoder) AddString

func (enc Encoder) AddString(key, val string)

func (Encoder) AddTime

func (enc Encoder) AddTime(key string, val time.Time)

func (Encoder) AddUint

func (enc Encoder) AddUint(k string, v uint)

func (Encoder) AddUint16

func (enc Encoder) AddUint16(k string, v uint16)

func (Encoder) AddUint32

func (enc Encoder) AddUint32(k string, v uint32)

func (Encoder) AddUint64

func (enc Encoder) AddUint64(key string, val uint64)

func (Encoder) AddUint8

func (enc Encoder) AddUint8(k string, v uint8)

func (Encoder) AddUintptr

func (enc Encoder) AddUintptr(k string, v uintptr)

func (Encoder) AppendArray

func (enc Encoder) AppendArray(arr zapcore.ArrayMarshaler) error

func (Encoder) AppendBool

func (enc Encoder) AppendBool(val bool)

func (Encoder) AppendByteString

func (enc Encoder) AppendByteString(val []byte)

func (Encoder) AppendComplex128

func (enc Encoder) AppendComplex128(val complex128)

func (Encoder) AppendComplex64

func (enc Encoder) AppendComplex64(v complex64)

func (Encoder) AppendDuration

func (enc Encoder) AppendDuration(val time.Duration)

func (Encoder) AppendFloat32

func (enc Encoder) AppendFloat32(v float32)

func (Encoder) AppendFloat64

func (enc Encoder) AppendFloat64(v float64)

func (Encoder) AppendInt

func (enc Encoder) AppendInt(v int)

func (Encoder) AppendInt16

func (enc Encoder) AppendInt16(v int16)

func (Encoder) AppendInt32

func (enc Encoder) AppendInt32(v int32)

func (Encoder) AppendInt64

func (enc Encoder) AppendInt64(val int64)

func (Encoder) AppendInt8

func (enc Encoder) AppendInt8(v int8)

func (Encoder) AppendObject

func (enc Encoder) AppendObject(obj zapcore.ObjectMarshaler) error

func (Encoder) AppendReflected

func (enc Encoder) AppendReflected(val interface{}) error

func (Encoder) AppendString

func (enc Encoder) AppendString(val string)

func (Encoder) AppendTime

func (enc Encoder) AppendTime(val time.Time)

func (Encoder) AppendTimeLayout

func (enc Encoder) AppendTimeLayout(time time.Time, layout string)

func (Encoder) AppendUint

func (enc Encoder) AppendUint(v uint)

func (Encoder) AppendUint16

func (enc Encoder) AppendUint16(v uint16)

func (Encoder) AppendUint32

func (enc Encoder) AppendUint32(v uint32)

func (Encoder) AppendUint64

func (enc Encoder) AppendUint64(val uint64)

func (Encoder) AppendUint8

func (enc Encoder) AppendUint8(v uint8)

func (Encoder) AppendUintptr

func (enc Encoder) AppendUintptr(v uintptr)

func (Encoder) Clone

func (c Encoder) Clone() zapcore.Encoder

func (Encoder) EncodeEntry

func (c Encoder) EncodeEntry(ent zapcore.Entry, fields []zapcore.Field) (*buffer.Buffer, error)

func (Encoder) OpenNamespace

func (enc Encoder) OpenNamespace(key string)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL