version: 1
disable_existing_loggers: no
formatters:
    simple:
        format: "%(asctime)s - %(levelname)s - %(message)s"
    complete:
        format: "%(asctime)s - %(name)s - %(levelname)s - %(message)s"
    short:
        format: "%(levelname)s - %(message)s"
    message_only:
        format: "%(message)s"
        
handlers:
    console:
        class: logging.StreamHandler
        level: INFO
        formatter: message_only
        stream: ext://sys.stdout
    file:
        class: logging.handlers.RotatingFileHandler
        level: DEBUG
        formatter: complete
        filename: debug.log
        maxBytes: 100000
        backupCount: 1
        encoding: utf8
    mail:
        class: core.BufferingSMTPHandler.BufferingSMTPHandler
        level: INFO
        formatter: complete
        mailhost: 
        fromaddr: log.%name%@manchenumerique.fr
        toaddrs: [olivier.massot@manchenumerique.fr]
        subject: Rapport d'execution de %name%
        capacity: 100000000

loggers:
    datachecker:
        level: DEBUG
        handlers: [console]
        propagate: no

root:
    level: DEBUG
    handlers: [console]
    propagate: yes