24. Log settingΒΆ
Perform logging using the Python logging function. See the Python logging documentation for details on how to specify log configuration options.
This is a log setting example to output to /tmp/y-bot.log.
version: 1
disable_existing_loggers: False
formatters:
simple:
format: '%(asctime)s %(name)-10s %(levelname)-7s %(message)s'
handlers:
file:
class: logging.handlers.RotatingFileHandler
formatter: simple
filename: /tmp/y-bot.log
root:
level: DEBUG
handlers:
- file