package
9.0.0-alpha+incompatible
Repository: https://github.com/pingcap/tidb.git
Documentation: pkg.go.dev

# Functions

BeginTask marks the beginning of a task.
FromContext returns the logger stored in the context.
InitLogger initializes Lightning's and also the TiDB library's loggers.
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.
NewContext returns a new context with the provided logger.
NewFilterCore returns a FilterCore, only logs under allowPackages will be written.
SetAppLogger replaces the default logger in this package to given one.
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.

# 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.