Skip to content

Commit dd8c740

Browse files
committed
* change the log location under production env from stderr of php process to ./var/log/prod.log with daily log rotating @ config/packages/monolog.yaml
@ be
1 parent e0a2cf0 commit dd8c740

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

be/config/packages/monolog.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,16 @@ 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: rotating_file
51+
path: "%kernel.logs_dir%/%kernel.environment%.log"
5252
level: debug
53-
formatter: monolog.formatter.json
53+
max_files: 10
5454
console:
5555
type: console
5656
process_psr_3_messages: false
5757
channels: ["!event", "!doctrine"]
5858
deprecation:
59-
type: stream
59+
type: rotating_file
6060
channels: [deprecation]
61-
path: php://stderr
62-
formatter: monolog.formatter.json
61+
path: "%kernel.logs_dir%/%kernel.environment%.log"
62+
max_files: 10

0 commit comments

Comments
 (0)