console

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(mode mode.Kind) func(zapcore.EncoderConfig) (zapcore.Encoder, error)

Register is used to register the console Encoder to the zap framework

Types

type Config

type Config struct {
	Config *zapcore.EncoderConfig
	Mode   mode.Kind
}

Config is an Encoder purposed configuration struct containing a reference to the zacore EncoderConfig as well as the encoder mode it should run in

type Encoder

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

Encoder is a bol.com tailored zap encoder for writing human readable logs to the console

func NewEncoder

func NewEncoder(cfg Config) *Encoder

NewEncoder initializes a a bol.com tailored Encoder

func (*Encoder) AddArray

func (e *Encoder) AddArray(key string, marshaler zapcore.ArrayMarshaler) error

func (*Encoder) AddBinary

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

func (*Encoder) AddBool

func (e *Encoder) AddBool(key string, val bool)

func (*Encoder) AddByteString

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

func (*Encoder) AddComplex128

func (e *Encoder) AddComplex128(key string, val complex128)

func (*Encoder) AddComplex64

func (e *Encoder) AddComplex64(key string, val complex64)

func (*Encoder) AddDuration

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

func (*Encoder) AddFloat32

func (e *Encoder) AddFloat32(key string, val float32)

func (*Encoder) AddFloat64

func (e *Encoder) AddFloat64(key string, val float64)

func (*Encoder) AddInt

func (e *Encoder) AddInt(key string, val int)

func (*Encoder) AddInt16

func (e *Encoder) AddInt16(key string, val int16)

func (*Encoder) AddInt32

func (e *Encoder) AddInt32(key string, val int32)

func (*Encoder) AddInt64

func (e *Encoder) AddInt64(key string, val int64)

func (*Encoder) AddInt8

func (e *Encoder) AddInt8(key string, val int8)

func (*Encoder) AddObject

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

func (*Encoder) AddReflected

func (e *Encoder) AddReflected(key string, val interface{}) error

func (*Encoder) AddString

func (e *Encoder) AddString(key string, val string)

func (*Encoder) AddTime

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

func (*Encoder) AddUint

func (e *Encoder) AddUint(key string, val uint)

func (*Encoder) AddUint16

func (e *Encoder) AddUint16(key string, val uint16)

func (*Encoder) AddUint32

func (e *Encoder) AddUint32(key string, val uint32)

func (*Encoder) AddUint64

func (e *Encoder) AddUint64(key string, val uint64)

func (*Encoder) AddUint8

func (e *Encoder) AddUint8(key string, val uint8)

func (*Encoder) AddUintptr

func (e *Encoder) AddUintptr(key string, val uintptr)

func (*Encoder) AppendArray

func (e *Encoder) AppendArray(arr zapcore.ArrayMarshaler) error

func (*Encoder) AppendBool

func (e *Encoder) AppendBool(val bool)

func (*Encoder) AppendByteString

func (e *Encoder) AppendByteString(bstr []byte)

func (*Encoder) AppendComplex128

func (e *Encoder) AppendComplex128(val complex128)

func (*Encoder) AppendComplex64

func (e *Encoder) AppendComplex64(val complex64)

func (*Encoder) AppendDuration

func (e *Encoder) AppendDuration(val time.Duration)

func (*Encoder) AppendFloat32

func (e *Encoder) AppendFloat32(val float32)

func (*Encoder) AppendFloat64

func (e *Encoder) AppendFloat64(val float64)

func (*Encoder) AppendInt

func (e *Encoder) AppendInt(val int)

func (*Encoder) AppendInt16

func (e *Encoder) AppendInt16(val int16)

func (*Encoder) AppendInt32

func (e *Encoder) AppendInt32(val int32)

func (*Encoder) AppendInt64

func (e *Encoder) AppendInt64(val int64)

func (*Encoder) AppendInt8

func (e *Encoder) AppendInt8(val int8)

func (*Encoder) AppendObject

func (e *Encoder) AppendObject(obj zapcore.ObjectMarshaler) error

func (*Encoder) AppendReflected

func (e *Encoder) AppendReflected(val interface{}) error

func (*Encoder) AppendString

func (e *Encoder) AppendString(str string)

func (*Encoder) AppendTime

func (e *Encoder) AppendTime(val time.Time)

func (*Encoder) AppendUint

func (e *Encoder) AppendUint(val uint)

func (*Encoder) AppendUint16

func (e *Encoder) AppendUint16(val uint16)

func (*Encoder) AppendUint32

func (e *Encoder) AppendUint32(val uint32)

func (*Encoder) AppendUint64

func (e *Encoder) AppendUint64(val uint64)

func (*Encoder) AppendUint8

func (e *Encoder) AppendUint8(val uint8)

func (*Encoder) AppendUintptr

func (e *Encoder) AppendUintptr(val uintptr)

func (*Encoder) Clone

func (e *Encoder) Clone() zapcore.Encoder

Clone implements the Clone method of the zapcore Encoder interface

func (*Encoder) EncodeEntry

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

EncodeEntry implements the EncodeEntry method of the zapcore Encoder interface

func (*Encoder) OpenNamespace

func (e *Encoder) OpenNamespace(key string)

Jump to

Keyboard shortcuts

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