version: 1
disable_existing_loggers: False
formatters:
  simple:
    format: "%(asctime)s - %(module)s - %(funcName)s - line:%(lineno)d - %(levelname)s - %(message)s"
handlers:
  console:
    class: logging.StreamHandler
    level: INFO
    formatter: simple
  info_file_handler:
    class: logging.handlers.TimedRotatingFileHandler
    filename: logs/info.log
    level: INFO
    formatter: simple
    encoding: utf8
    when: d
    interval: 1
    backupCount: 30
  error_file_handler:
    class: logging.handlers.RotatingFileHandler
    level: ERROR
    formatter: simple
    filename: logs/errors.log
    backupCount: 20
    encoding: utf8
root:
    level: INFO
    handlers: [console, info_file_handler, error_file_handler]