Skip to content

Commit

Permalink
Update monolog
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanHuisman committed Feb 6, 2025
1 parent ee2b299 commit e63b46b
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 40 deletions.
75 changes: 67 additions & 8 deletions config/packages/monolog.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,68 @@
monolog:
handlers:
access:
type: rotating_file
path: '%kernel.logs_dir%/%kernel.environment%.access.log'
action_level: debug
channels: [access]
# 2 maanden
max_files: 60
channels:
- deprecation # Deprecations are logged in the dedicated "deprecation" channel when it exists

when@dev:
monolog:
handlers:
main:
type: stream
path: '%kernel.logs_dir%/%kernel.environment%.log'
level: debug
channels: ['!event']
# uncomment to get logging in your browser
# you may have to allow bigger header sizes in your Web server configuration
#firephp:
# type: firephp
# level: info
#chromephp:
# type: chromephp
# level: info
console:
type: console
process_psr_3_messages: false
channels: ['!event', '!doctrine', '!console']

when@test:
monolog:
handlers:
main:
type: fingers_crossed
action_level: error
handler: nested
excluded_http_codes: [404, 405]
channels: ['!event']
nested:
type: console
level: debug

when@prod:
monolog:
handlers:
access:
type: rotating_file
path: '%kernel.logs_dir%/%kernel.environment%.access.log'
action_level: debug
channels: [access]
# 2 maanden
max_files: 60
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
formatter: monolog.formatter.json
25 changes: 0 additions & 25 deletions config/packages/prod/monolog.yaml

This file was deleted.

12 changes: 5 additions & 7 deletions symfony.lock
Original file line number Diff line number Diff line change
Expand Up @@ -542,17 +542,15 @@
"version": "v5.0.4"
},
"symfony/monolog-bundle": {
"version": "3.3",
"version": "3.10",
"recipe": {
"repo": "github.com/symfony/recipes",
"branch": "master",
"version": "3.3",
"ref": "5f5bdd0f0bd94eedc40ebf637d3c9fe9e48c9689"
"branch": "main",
"version": "3.7",
"ref": "aff23899c4440dd995907613c1dd709b6f59503f"
},
"files": [
"./config/packages/dev/monolog.yaml",
"./config/packages/prod/monolog.yaml",
"./config/packages/test/monolog.yaml"
"config/packages/monolog.yaml"
]
},
"symfony/options-resolver": {
Expand Down

0 comments on commit e63b46b

Please sign in to comment.