1

I have a project that is in laravel 4.1. My app/storage/logs/laravel.log in production has gotten huge.

I have looked around for log rotation, but could not find anything laravel 4 related. In laravel 5 there is a log option in the config/app.php which you can give values like daily etc. But I don't see any such option in laravel 4. https://github.com/laravel/laravel/blob/v4.1.0/app/config/app.php

How can i acheive log rotation in laravel 4?

Mubashar Abbas
  • 5,536
  • 4
  • 38
  • 49

1 Answers1

1

Add following lines of code in your app/start/global.php file.

$logFile = 'laravel.log';

Log::useDailyFiles(storage_path().'/logs/'.$logFile);
Mahfuzul Alam
  • 3,057
  • 14
  • 15