bot.log
#
Logging.
Module Contents#
Classes#
Custom implementation of the Logger class with an added trace method. |
Functions#
|
Make mypy recognise that logger is of type CustomLogger. |
|
Set up loggers. |
|
Set up the Sentry logging integrations. |
|
Set loggers to the trace level according to the value from the BOT_TRACE_LOGGERS env var. |
Attributes#
- class bot.log.CustomLogger(name, level=NOTSET)[source]#
Bases:
LoggerClass
Custom implementation of the Logger class with an added trace method.
- bot.log.get_logger(name: str | None = None) CustomLogger [source]#
Make mypy recognise that logger is of type CustomLogger.
- bot.log._set_trace_loggers() None [source]#
Set loggers to the trace level according to the value from the BOT_TRACE_LOGGERS env var.
When the env var is a list of logger names delimited by a comma, each of the listed loggers will be set to the trace level.
If this list is prefixed with a “!”, all of the loggers except the listed ones will be set to the trace level.
Otherwise if the env var begins with a “*”, the root logger is set to the trace level and other contents are ignored.