Laravel - Stop adding stacktrace details.
laravel, logging, php
Solution
Yes - you can override the `App::error()` filter with something like this:
App::error(function(Exception $exception, $code)
{
Log::error('This is the only error message that will appear in your logs');
if( ! (Config::get('app.debug')))
{
return Response::view('errors.error_page', array(), 500);
}
});
Problem
I am just beginning with Laravel and found that whenever we get any error / exception then Laravel itself appends stacktrace results in log file. Is there any way to stop it as I don't need it at all and it is unnecessarily increasing the log file size on production server. Please help me to get rid off from this issue. Thanks in advance !!