---
version: 1

disable_existing_loggers: false

formatters:
    spaced:
        # class is not needed here as LineFormatter is the default Formatter when none is provided
        class: Monolog\Formatter\LineFormatter
        format: "%datetime% %channel%.%level_name%  %message%\n"
        include_stacktraces: true
    dashed:
        format: "%datetime%-%channel%.%level_name% - %message%\n"

processors:
    web_processor:
        class: Monolog\Processor\WebProcessor

handlers:
    console:
        class: Monolog\Handler\StreamHandler
        level: DEBUG
        formatter: spaced
        stream: php://stdout
    info_file_handler:
        class: Monolog\Handler\StreamHandler
        level: INFO
        formatter: dashed
        stream: ./example_info.log
    error_file_handler:
        class: Monolog\Handler\StreamHandler
        level: ERROR
        formatter: dashed
        stream: ./example_error.log

loggers:
    loggerA:
        handlers: [console, info_file_handler]
    loggerB:
        handlers: [console, error_file_handler]
        processors: [web_processor]
