Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel log max file is not working

I am using laravel 5.2, I just deployed my code on server. I am using laravel logs on the daily basis and so in the confg/app.php i added these two lines

'log' => 'daily'
'log_max_files' => 15 

But it is not keeping the logs of 15 days. It is always keeping the logs of last 5 days only which is default file size. Am i missing something to add..?

like image 752
RAUSHAN KUMAR Avatar asked Jun 28 '17 12:06

RAUSHAN KUMAR


2 Answers

First of all you should run

php artisan config:cache

to cache your configuration.

In addition you should run

php artisan queue:restart

to make sure your queue workers will see the changes.

Additionally you should make sure there are valid permissions to log files to make it possible to delete them.

like image 156
Marcin Nabiałek Avatar answered Oct 23 '22 11:10

Marcin Nabiałek


You have to run this command on your terminal

php artisan config:cache
like image 28
Rahul Hirve Avatar answered Oct 23 '22 11:10

Rahul Hirve