# Functions
InitLogger initializes Lightning's and also the TiDB library's loggers.
InitRedact inits the enableRedactLog.
IsContextCanceledError returns whether the error is caused by context cancellation.
L returns the current logger for Lightning.
Level returns the current global log level.
MakeTestLogger creates a Logger instance which produces JSON logs.
NeedRedact returns whether to redact log.
NewFilterCore returns a FilterCore.
RedactString receives string argument and return omitted information if redact log enabled.
RedactStringer receives stringer argument and return omitted information if redact log enabled.
SetLevel modifies the log level of the global logger.
ShortError contructs a field which only records the error message without the verbose text (i.e.
With creates a child logger from the global logger and adds structured context to it.
ZapRedactArray receives zap.Array and return omitted information if redact log enabled.
ZapRedactBinary receives zap.Binary and return omitted information if redact log enabled.
ZapRedactReflect receives zap.Reflect and return omitted information if redact log enabled.
ZapRedactString receives stringer argument and return omitted information in zap.Field if redact log enabled.
ZapRedactStringer receives stringer argument and return omitted information in zap.Field if redact log enabled.
# Structs
Config serializes log related config in toml/json.
FilterCore is a zapcore.Core implementation, it filters log by path-qualified package name.
Logger is a simple wrapper around *zap.Logger which provides some extra methods to simplify Lightning's log usage.
Task is a logger for a task spanning a period of time.