package
0.0.0-20240925005403-6c424d2dd70d
Repository: https://github.com/traitmeta/metago.git
Documentation: pkg.go.dev
# Packages
No description provided by the author
# Functions
DefaultClientCodeToLevel 根据RPC客户端返回码返回zap日志级别.
DefaultCodeToLevel 根据RPC服务端返回码返回zap日志级别.
DurationToTimeMillisField 持续时间转换为毫秒并使用key[time_ms].
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
SetUp 初始化zap Logger.
TimeEncoder 设置时间格式化方式.
No description provided by the author
WithCodes 自定义error映射 error code.
No description provided by the author
WithDecider 自定义拦截器日志是否记录.
WithDurationField 自定义将请求持续时间映射到Zap字段.
WithLevels 定义gRPC返回码和拦截器日志级别映射.
WithMessageProducer 自定义消息格式.
WithTimestampFormat 自定义日志字段中发出的时间戳.
# Constants
ErrorLevel includes errors, slows, stacks.
InfoLevel logs everything.
SevereLevel only log severe messages.
# Variables
DefaultDurationToField 请求持续时间转换为Zap字段.
ErrLogPathNotSet is an error that indicates the log path is not set.
ErrLogServiceNameNotSet is an error that indicates that the service name is not set.
# Type aliases
CodeToLevel rpc返回码与zap日志级别映射.
DurationToField 生成日志持续时间.
MessageProducer 生成日志消息.
Option 可选参数.