I would like to use Monolog in symfony2 application for logging, but my question is how can I split the file every day instead of appending to the same file?
I would like my log file to be somthing like below:
"%kernel.logs_dir%/%kernel.environment%.%date%.log" Which %date% should be replaced with real date.
I read that logrotate but I don't understand how to use it ?
Use multiple handlers
Example:
It's explained in the Symfony2 Cookbook http://symfony.com/doc/current/cookbook/logging/monolog.html
And specific for you (channels): http://symfony.com/doc/current/cookbook/logging/channels_handlers.html