Error logging handler is defined or registered in the app/start/global.php. We will define or configure logger
to use a single log. In laravel we have MONOLOGY logging library. By using Monolog offers we will use n number of handlers.
Example
$logFile = 'laravel.log';
Log::useDailyFiles(storage_path().'/logs/'.$logFile);
Note: For closing error log we will make false debug in app/config/app.php file.
Error Handling
All the error are handled using the file app/start/global.php.
App::error(function(Exception $exception)
{
Log::error($exception);
});
This is the most basic error handler. There are more handlers are also available.
0 Comment(s)