logs

package
v0.0.0-...-48e7155 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Error

func Error(message string, err error, fields ...zap.Field)

Error 记录 error 级别日志,并解析堆栈

func NewZapJsonEncoder

func NewZapJsonEncoder(cfg zapcore.EncoderConfig) zapcore.Encoder

NewZapJsonEncoder creates a fast, low-allocation JSON encoder. The encoder appropriately escapes all field keys and values.

Note that the encoder doesn't deduplicate keys, so it's possible to produce a message like

{"foo":"bar","foo":"baz"}

This is permitted by the JSON specification, but not encouraged. Many libraries will ignore duplicate key-value pairs (typically keeping the last pair) when unmarshaling, but users should attempt to avoid adding duplicate keys.

func ParseErr

func ParseErr(err error) zap.Field

ParseErr 解析携带堆栈的错误

Types

This section is empty.

Jump to

Keyboard shortcuts

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