How to create rotating log file with Laravel and Monlog
问题 I'm trying to create my own rotating log file in Laravel using Monolog, however, the file rotation is not working and I don't know why. I've created an artisan command that runs once per day, and keeps a log of it's activity. I want old versions of this file to be deleted after 2 days. In other words only the log of today's run, as well as yesterday's run should exist. At the beginning of my artisan command, I have the following code: $log = new Logger('MyCustomLog'); $log->pushHandler(new