Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(logs): Ensure log production logs to file, so ELk can fetch them. #143

Merged
merged 1 commit into from
Nov 26, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 4 additions & 18 deletions config/packages/monolog.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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