diff --git a/application/config/error.php b/application/config/error.php index a39fcb9c..c63ba57e 100644 --- a/application/config/error.php +++ b/application/config/error.php @@ -31,29 +31,6 @@ 'log' => false, - /* - |-------------------------------------------------------------------------- - | Error Handler - |-------------------------------------------------------------------------- - | - | Because of the various ways of managing errors, you get complete freedom - | to manage errors as you desire. Any error that occurs in your application - | will be sent to this Closure. - | - | By default, when error detail is disabled, a generic error page will be - | rendered by the handler. After this handler is complete, the framework - | will stop processing the request and "exit" will be called. - | - */ - - 'handler' => function($exception, $config) - { - if ( ! $config['detail']) - { - Response::error('500')->send(); - } - }, - /* |-------------------------------------------------------------------------- | Error Logger @@ -73,11 +50,13 @@ | */ - 'logger' => function($exception, $config) + 'logger' => function($e, $config) { - $message = date('Y-m-d H:i:s').' - '.$exception->getMessage().PHP_EOL; + $format = '%s | Message: %s | File: %s | Line: %s'; - File::append(STORAGE_PATH.'log.txt', $message); + $message = sprintf($format, date('Y-m-d H:i:s'), $e->getMessage(), $e->getFile(), $e->getLine()); + + File::append(STORAGE_PATH.'log.txt', $message.PHP_EOL); } ); \ No newline at end of file diff --git a/laravel/bootstrap/core.php b/laravel/bootstrap/core.php index 8442839d..c8378bc0 100644 --- a/laravel/bootstrap/core.php +++ b/laravel/bootstrap/core.php @@ -58,7 +58,6 @@ */ Config::load('application'); Config::load('session'); -Config::load('error'); /** * Register the Autoloader's "load" method on the auto-loader stack. diff --git a/laravel/cookie.php b/laravel/cookie.php index 24a9b0b9..09094ddf 100644 --- a/laravel/cookie.php +++ b/laravel/cookie.php @@ -1,6 +1,6 @@
".$exception->getTraceAsString()."