From 785744cf10fb92ba5c30b1c986fe420d12568c0c Mon Sep 17 00:00:00 2001 From: Peter Lieverdink Date: Mon, 25 Nov 2024 15:08:00 +1100 Subject: [PATCH] fix(logs): Ensure log production logs to file, so ELk can fetch them. No need for fancy anything. Refs: OPS-11113 --- config/packages/monolog.yaml | 22 ++++------------------ 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/config/packages/monolog.yaml b/config/packages/monolog.yaml index 8c9efa9..136f7f0 100644 --- a/config/packages/monolog.yaml +++ b/config/packages/monolog.yaml @@ -30,7 +30,7 @@ when@test: type: fingers_crossed action_level: error handler: nested - excluded_http_codes: [404, 405] + excluded_http_codes: [400, 404, 405] channels: ["!event"] nested: type: stream @@ -40,22 +40,8 @@ when@test: when@prod: monolog: handlers: + # We want normal production logs, which all go to ELK. No need for fancy action_levels. main: - type: fingers_crossed - action_level: error - handler: nested - excluded_http_codes: [404, 405] - 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"] - deprecation: type: stream - channels: [deprecation] - path: php://stderr + path: "%kernel.logs_dir%/%kernel.environment%.log" + level: info