Thats how I have it, and daily files are created.
Logging single vs daily in Laravel 5.7
Hello everyone, I'm trying to log things daily as my application runs but I've noticed something weird...
With laravel 5.5 or lower, it was very easy. Setting APP_LOG in env to daily was all. Then, Laravel created log files daily using names something like yyyy-mm-dd-log...
With laravel 5.6 and higher, it seems things are little different.
LOG_CHANNEL=daily
I've added the code above to my env file then cleared and cached config. However, laravel doesn't seem to create daily log files but log everything in laravel.log. So, I've opened up logging.php under config folder... then found the following code
'single' => [
'driver' => 'single',
'path' => storage_path('logs/laravel.log'),
'level' => 'debug',
],
'daily' => [
'driver' => 'daily',
'path' => storage_path('logs/laravel.log'),
'level' => 'debug',
'days' => 7,
],
So... it seems like both single and daily are using the same laravel.log file... is this how the recent laravel supposed to log?
What should I do if I want Laravel to log things daily like before (yyyy-mm-dd format)?
Thanks.
Please or to participate in this conversation.