Reputation: 69
How to disable logging in Laravel4.
In codeigniter there is a config like below where we can disable the entire logging itself. Is there any configuration in laravel4 where we can disable it to gain the performance.
$config['log_threshold'] = 0; // <--------- zero to disable logging
Upvotes: 1
Views: 2477
Reputation: 5874
Update: This is for Laravel 4.2
Looking at Laravel Error documentation:
You can disable the log by commenting two lines in your app/start/global.php
:
/*
|--------------------------------------------------------------------------
| 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.
|
*/
// Log::useFiles(storage_path().'/logs/laravel.log');
and
App::error(function(Exception $exception, $code)
{
// Log::error($exception);
});
Upvotes: 1