Logger configuration
Default
This is the only logger added by default
[log.stdout]
type = "stdout"
level = "INFO"
use_ansi = true
This prints all logs at the INFO level or above to stdout, with ansi colouring
Format
The log key is a table of each logger. The keys are mostly irrelevant, it’s really only used for
logging. The properties are
-
type(stdoutorfile)
The logger type.stdoutlogs to stdout, whilefilelogs to a provided location -
level(ERROR,WARN,INFO,DEBUG,TRACEcase insensitively) The minimum level to log. The levels are (in order)ERRORCritical errorsWARNGeneral warningsINFORelatively unimportant but nice infoDEBUGSlightly noisier logs that are mostly useful for debuggingTRACEReally noisy logs. You probably shouldn’t ever print these to stdout.
e.g. if you set it to
INFO, it’ll print logs with the levelsINFO,WARN, andERROR. -
use_ansi(true/false) If true, prints out logs with ANSI colours. You probably shouldn’t use this when logging to files. -
env_filter(optional string) An envfilter to apply to the data. For more info, see tracing_subscriber’s docs -
path(only whentypeisfile) The path to output the logs to