Log

(Appears on: TiDBConfig)

Log is the log section of config.

FieldDescription
level
string
(Optional)

Log level. Optional: Defaults to info

format
string
(Optional)

Log format. one of json, text, or console. Optional: Defaults to text

disable-timestamp
bool
(Optional)

Disable automatic timestamps in output.

enable-timestamp
bool
(Optional)

EnableTimestamp enables automatic timestamps in log output.

enable-error-stack
bool
(Optional)

EnableErrorStack enables annotating logs with the full stack error message.

file
FileLogConfig
(Optional)

File log config.

enable-slow-log
bool
(Optional)
slow-query-file
string
(Optional)
slow-threshold
uint64
(Optional)

Optional: Defaults to 300

expensive-threshold
uint
(Optional)

Optional: Defaults to 10000

query-log-max-len
uint64
(Optional)

Optional: Defaults to 2048

record-plan-in-slow-log
uint32
(Optional)

Optional: Defaults to 1