Skip to content

Commit 24a1601

Browse files
committed
Log to syslog in production and stderr in dev
1 parent 1a004c6 commit 24a1601

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

api/config/packages/monolog.yaml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ when@dev:
77
handlers:
88
main:
99
type: stream
10-
path: "%kernel.logs_dir%/%kernel.environment%.log"
10+
path: php://stderr
1111
level: debug
1212
channels: ["!event"]
1313
# uncomment to get logging in your browser
@@ -34,7 +34,7 @@ when@test:
3434
channels: ["!event"]
3535
nested:
3636
type: stream
37-
path: "%kernel.logs_dir%/%kernel.environment%.log"
37+
path: php://stderr
3838
level: debug
3939

4040
when@prod:
@@ -47,16 +47,14 @@ when@prod:
4747
excluded_http_codes: [404, 405]
4848
buffer_size: 50 # How many messages should be saved? Prevent memory leaks
4949
nested:
50-
type: stream
51-
path: php://stderr
50+
type: syslog
5251
level: debug
5352
formatter: monolog.formatter.json
5453
console:
5554
type: console
5655
process_psr_3_messages: false
5756
channels: ["!event", "!doctrine"]
5857
deprecation:
59-
type: stream
58+
type: syslog
6059
channels: [deprecation]
61-
path: php://stderr
6260
formatter: monolog.formatter.json

0 commit comments

Comments
 (0)