Skip to content

Instantly share code, notes, and snippets.

@andybeak
Created April 9, 2015 07:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andybeak/7cd44976a1036bf0130e to your computer and use it in GitHub Desktop.
Save andybeak/7cd44976a1036bf0130e to your computer and use it in GitHub Desktop.
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());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment