Created
April 9, 2015 07:39
-
-
Save andybeak/7cd44976a1036bf0130e to your computer and use it in GitHub Desktop.
Laravel logging - change level for production
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
|-------------------------------------------------------------------------- | |
| Application Error Logger | |
|-------------------------------------------------------------------------- | |
| | |
| Here we will configure the error logger setup for the application which | |
| is built on top of the wonderful Monolog library. By default we will | |
| build a basic log file setup which creates a single file for logs. | |
| | |
*/ | |
if (Config::get('app.debug') == true) { | |
$level = 'debug'; | |
} else { | |
$level = 'warning'; | |
} | |
Log::useDailyFiles(storage_path() . '/logs/laravel.log', 3, $level); | |
$log = Log::getMonolog(); | |
$log->pushProcessor(new Monolog\Processor\MemoryUsageProcessor()); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment