monolog: channels: # To see all channels, run bin/console debug:autowiring logger - deprecation # Deprecations are logged in the dedicated "deprecation" channel when it exists - audit # Who did what to a booking or a resource -- see App\Service\AuditLogger handlers: # The audit trail is kept in every environment, on its own file and for 30 days. It is # deliberately not routed through the handlers below: those are fingers_crossed in prod, # which means records are dropped unless an error happens to flush the buffer -- fine for # debug noise, useless for a trail that has to be complete. Hence the plain handler, and # hence "!audit" on the others so the same record is not duplicated into them. audit: type: rotating_file path: "%kernel.logs_dir%/audit.%kernel.environment%.log" max_files: 30 level: info channels: [audit] formatter: monolog.formatter.json when@dev: monolog: handlers: main: type: stream path: "%kernel.logs_dir%/%kernel.environment%.log" level: debug channels: ["!event", "!audit"] console: type: console process_psr_3_messages: false channels: ["!event", "!doctrine", "!console", "!audit"] when@test: monolog: handlers: main: type: fingers_crossed action_level: error handler: nested excluded_http_codes: [404, 405] channels: ["!event", "!audit"] nested: type: stream path: "%kernel.logs_dir%/%kernel.environment%.log" level: debug when@prod: monolog: handlers: main: type: fingers_crossed action_level: error handler: nested excluded_http_codes: [404, 405] channels: ["!deprecation", "!audit"] buffer_size: 50 # How many messages should be saved? Prevent memory leaks nested: type: stream path: php://stderr level: debug formatter: monolog.formatter.json console: type: console process_psr_3_messages: false channels: ["!event", "!doctrine", "!audit"] deprecation: type: stream channels: [deprecation] path: php://stderr formatter: monolog.formatter.json