I have a a few commands, all of them work as intended, but every time i call one of them i get deprecation messages, for example something like that:
2024-08-14T11:57:50+00:00 [info] User Deprecated: getRawData only returns the first dataset loaded, which may not be what you expect. Use getAllRawData() instead which returns all datasets for all autoloaders present in the process.
Is there any possible way in symfony to prevent messages from stdout, but log them in file?
I tried update monolog as below to filter data
deprecation_stream:
type: stream
path: "%kernel.logs_dir%/%kernel.environment%.deprecations.log"
deprecation_filter:
type: filter
handler: deprecation_stream
max_level: info
channels: [ "php" ]
And it works, i have errors in deprecations.log, but the still appear when i call a command.
New contributor
Adam Burdel is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.