Documentation ¶
Index ¶
- Variables
- type Field
- func Duration(k string, d time.Duration) Field
- func Error(v error) Field
- func Float64(key string, val float64) Field
- func Int(k string, i int) Field
- func Int64(k string, i int64) Field
- func Object(key string, val zapcore.ObjectMarshaler) Field
- func String(k, v string) Field
- func Time(key string, val time.Time) Field
- type Logger
- type ObjectEncoder
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultLogger = NewNopLogger()
DefaultLogger is the default logger.
Functions ¶
This section is empty.
Types ¶
type Field ¶
Field is the logger field.
type Logger ¶
type Logger interface { Panic(context.Context, string, ...Field) Info(context.Context, string, ...Field) Error(context.Context, string, ...Field) Debug(context.Context, string, ...Field) Sync() error With(fields ...Field) Logger }
Logger is the standart logger interface.
func NewDevelopmentLogger ¶
NewDevelopmentLogger initializes a development logger.
func NewProductionLogger ¶
NewProductionLogger initializes a production logger.
type ObjectEncoder ¶
type ObjectEncoder = zapcore.ObjectEncoder
ObjectEncoder is the logger representation of a structure.
Click to show internal directories.
Click to hide internal directories.