Last active
May 31, 2023 18:34
-
-
Save nemishkor/afcc7e7f26377c04ffa7a2e1a61f2d12 to your computer and use it in GitHub Desktop.
logger configuration for symfony framework
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
monolog: | |
channels: | |
- deprecation # Deprecations are logged in the dedicated "deprecation" channel when it exists | |
when@dev: | |
monolog: | |
handlers: | |
main: | |
type: rotating_file | |
max_files: 7 | |
path: "%kernel.logs_dir%/%kernel.environment%.log" | |
level: warning | |
channels: ["!event"] | |
deprecation: | |
type: rotating_file | |
max_files: 7 | |
path: "%kernel.logs_dir%/%kernel.environment%.deprecation.log" | |
level: warning | |
channels: ["deprecation"] | |
all: | |
type: rotating_file | |
max_files: 7 | |
path: "%kernel.logs_dir%/%kernel.environment%.debug.log" | |
level: debug | |
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: stream | |
path: "%kernel.logs_dir%/%kernel.environment%.log" | |
level: debug | |
when@prod: | |
monolog: | |
handlers: | |
main: | |
type: rotating_file | |
max_files: 7 | |
path: "%kernel.logs_dir%/%kernel.environment%.log" | |
level: warning | |
channels: ["!event"] | |
deprecation: | |
type: rotating_file | |
max_files: 7 | |
path: "%kernel.logs_dir%/%kernel.environment%.deprecation.log" | |
level: warning | |
channels: ["deprecation"] | |
all: | |
type: rotating_file | |
max_files: 7 | |
path: "%kernel.logs_dir%/%kernel.environment%.debug.log" | |
level: debug | |
console: | |
type: console | |
process_psr_3_messages: false | |
channels: ["!event", "!doctrine", "!console"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment