Documentation ¶
Index ¶
- Constants
- func New(env core.Env)
- func NewContext(ctx context.Context, fields ...zap.Field) context.Context
- func NewDevelopment() *zap.Logger
- func NewLocal() *zap.Logger
- func NewProduction() *zap.Logger
- func NewStringJSONEncoder(cfg zapcore.EncoderConfig) (zapcore.Encoder, error)
- func NoContext() *zap.Logger
- func WithContext(ctx context.Context) *zap.Logger
- type LogKey
Constants ¶
View Source
const StringJSONEncoderName string = "string_json"
StringJSONEncoderName is used for registering this encoder with zap.
Variables ¶
This section is empty.
Functions ¶
func NewContext ¶
NewContext ... A helper for middleware to create requestId or other context fields and return a context which logger can understand.
func NewStringJSONEncoder ¶
func NewStringJSONEncoder(cfg zapcore.EncoderConfig) (zapcore.Encoder, error)
NewStringJSONEncoder returns an encoder that encodes the JSON log dict as a string so the log processing pipeline can correctly process logs with nested JSON.
Types ¶
Click to show internal directories.
Click to hide internal directories.