zaputil

package
v0.131.1 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: MPL-2.0, MPL-2.0 Imports: 3 Imported by: 1

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.

Jump to

Keyboard shortcuts

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