Laravel log file based on date Ask Question
發表於 : 2017-09-11 23:00:23
https://stackoverflow.com/questions/355 ... ed-on-date
It's actually a lot simpler than that. In your config/app.php you'll see the line:
closer to the bottom of the file. Laravel by default uses the single method, which stores all errors in a single, expanding file. If you change this line to:
it will tell Laravel that you'd prefer to have multiple logs, each suffixed with the date of the when the error occurs.
There's a few other methods available, so be sure to check out the official documentation for more info.
It's actually a lot simpler than that. In your config/app.php you'll see the line:
代碼: 選擇全部
'log' => 'single',
代碼: 選擇全部
'log' => 'daily',
There's a few other methods available, so be sure to check out the official documentation for more info.