I have migrated an application from Symfony 3.4 to Symfony 4.4.
Now I have a lot of deprecations for each request/ Sf command (I can't fix that deprecations).
How can I exclude deprecations from the log for this Symfony App?
Exclude the php
channel from the log handler:
Eg. config/packages/prod/monolog.yaml
:
monolog:
handlers:
main:
type: stream
path: %kernel.logs_dir%/%kernel.environment%.log
level: debug
formatter: monolog.formatter.session_request
channels:
- '!php' # <----------- add this line
Leave deprecation messages in the dev
mode though. You should be aware of the changes in upstream packages.
Set the following env variable (eg. in .env.local):
SYMFONY_DEPRECATIONS_HELPER=weak
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With