Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewConsoleHexEncoder ¶
func NewConsoleHexEncoder(cfg zapcore.EncoderConfig) zapcore.Encoder
func NewJSONHexEncoder ¶
func NewJSONHexEncoder(cfg zapcore.EncoderConfig) zapcore.Encoder
NewJSONHexEncoder creates a JSON logger based on zapcore.NewJSONEncoder but overwrites encoding of byte slices. Instead encoding them with base64, jsonHexEncoder uses hex-encoding. Each hex-encoded value is prefixed with 0x so that it's clear it's a hex string.
func RegisterConsoleHexEncoder ¶
func RegisterConsoleHexEncoder() error
func RegisterJSONHexEncoder ¶
func RegisterJSONHexEncoder() error
RegisterJSONHexEncoder registers a jsonHexEncoder under "json-hex" name. Later, this name can be used as a value for zap.Config.Encoding to enable jsonHexEncoder.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.