package
0.0.0-20210724093922-c95b7eeff255
Repository: https://github.com/frankhang/util.git
Documentation: pkg.go.dev
# Functions
BgLogger is alias of `logutil.BgLogger()`.
Event records event in current tracing span.
Eventf records event in current tracing span with format support.
Hex defines a fmt.Stringer for proto.Message.
InitLogger initializes PD's logger.
InitZapLogger initializes a zap logger with cfg.
Logger gets a contextual logger from current context.
NewFileLogConfig creates a FileLogConfig.
NewLogConfig creates a LogConfig.
SetLevel sets the zap logger's level.
SetTag sets tag kv-pair in current tracing span.
WithConnID attaches connId to context.
WithString attaches key/int to context.
WithString attaches key/string to context.
# Constants
DefaultLogFormat is the default format of the log.
MB.
DefaultQueryLogMaxLen is the default max length of the query in the log.
DefaultRecordPlanInSlowLog is the default value for whether enable log query plan in the slow log.
DefaultSlowThreshold is the default slow log threshold in millisecond.
OldSlowLogTimeFormat is the first version of the the time format for slow log, This is use for compatibility.
SlowLogTimeFormat is the time format for slow log.
TraceEventKey presents the TraceEventKey in span log.
# Variables
EmptyFileLogConfig is an empty FileLogConfig.
SlowQueryLogger is used to log slow query, InitLogger will modify it according to config file.
SlowQueryZapLogger is used to log slow query, InitZapLogger will modify it according to config file.
# Structs
FileLogConfig serializes file log related config in toml/json.
LogConfig serializes log related config in toml/json.