1 頁 (共 1 頁)

Laravel log file based on date Ask Question

發表於 : 2017-09-11 23:00:23
yehlu
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:

代碼: 選擇全部

'log' => 'single',
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:

代碼: 選擇全部

'log' => 'daily',
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.

Re: Laravel log file based on date Ask Question

發表於 : 2017-09-15 09:10:55
yehlu
.env

代碼: 選擇全部

APP_LOG=daily