11monolog :
22 channels :
33 - deprecation # Deprecations are logged in the dedicated "deprecation" channel when it exists
4+ - app # Application-level errors (business logic), logged with extra context
45
56when@dev :
67 monolog :
@@ -9,11 +10,16 @@ when@dev:
910 type : stream
1011 path : " %kernel.logs_dir%/%kernel.environment%.log"
1112 level : debug
12- channels : ["!event"]
13+ channels : ["!event", "!app" ]
1314 console :
1415 type : console
1516 process_psr_3_messages : false
1617 channels : ["!event", "!doctrine", "!console"]
18+ app :
19+ type : stream
20+ path : " %kernel.logs_dir%/app.log"
21+ level : debug
22+ channels : [app]
1723
1824when@test :
1925 monolog :
@@ -37,11 +43,11 @@ when@prod:
3743 action_level : error
3844 handler : nested
3945 excluded_http_codes : [404, 405]
40- channels : ["!deprecation"]
46+ channels : ["!deprecation", "!app" ]
4147 buffer_size : 50 # How many messages should be saved? Prevent memory leaks
4248 nested :
4349 type : stream
44- path : php://stderr
50+ path : " %kernel.logs_dir%/%kernel.environment%.log "
4551 level : debug
4652 formatter : monolog.formatter.json
4753 console :
@@ -51,5 +57,11 @@ when@prod:
5157 deprecation :
5258 type : stream
5359 channels : [deprecation]
54- path : php://stderr
60+ path : " %kernel.logs_dir%/deprecation.log"
61+ formatter : monolog.formatter.json
62+ app :
63+ type : stream
64+ channels : [app]
65+ path : " %kernel.logs_dir%/app.log"
66+ level : debug
5567 formatter : monolog.formatter.json
0 commit comments