9

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..?

RAUSHAN KUMAR
  • 5,846
  • 4
  • 34
  • 70

2 Answers2

10

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.

Marcin Nabiałek
  • 109,655
  • 42
  • 258
  • 291
  • I am curious - can you explain why caching config would help? Do you mean there might be some old config currently cached? – Don't Panic Dec 20 '17 at 07:37
  • @Don'tPanic Yes, old configuration might be cached and when there is no `log_max_files` set by default Laravel will use 5 as far as I remember – Marcin Nabiałek Dec 20 '17 at 07:58
1

You have to run this command on your terminal

php artisan config:cache
Rahul Hirve
  • 1,109
  • 13
  • 20