andybeak
4/9/2015 - 7:39 AM

Laravel logging - change level for production

Laravel logging - change level for production

/*
|--------------------------------------------------------------------------
| 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());