How I make log by day in Symfony

Multi tool use
How I make log by day in Symfony
community. I need make logs files daily with Symfony4; or push a current date in a yml file. Specifically in monologo.yml.
handlers:
app:
type: stream
path: "%kernel.logs_dir%/system_compact_%kernel.environment%-***date***.log"
channels: ["app"]
Thank a lot.
1 Answer
1
Use can use "rotating_file" log type:
monolog:
handlers:
main:
type: rotating_file
path: "%kernel.logs_dir%/system_compact_%kernel.environment%.log"
Look at this documentation page: https://symfony.com/doc/current/logging.html#how-to-rotate-your-log-files
This handler creates a new log file every day
– G1.3
Jul 3 at 19:47
This handler creates a new log file every day
Thank u very much, it was vary easy. I was getting crazy.
– Félix Miguel Cabrera Ranklin
Jul 4 at 3:11
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
How I specific 1 day? Thank u
– Félix Miguel Cabrera Ranklin
Jul 3 at 15:09