Commit f54ef2b4 authored by Taylor Otwell's avatar Taylor Otwell

Added "logger" option to error configuration.

parent 3f20c10d
......@@ -14,7 +14,7 @@ return array(
|
*/
'detail' => true,
'detail' => false,
/*
|--------------------------------------------------------------------------
......@@ -24,11 +24,32 @@ return array(
| Would you like errors to be logged? Error logging can be extremely
| helpful when debugging a production application.
|
| Note: When error logging is enabled, errors will be logged even when
| error detail is disabled.
*/
'log' => true,
/*
|--------------------------------------------------------------------------
| Error Logger
|--------------------------------------------------------------------------
|
| Because of the sundry ways of managing error logging, you get complete
| flexibility to manage error logging as you see fit.
|
| This function will be called when an error occurs in your application.
| You can log the error however you like.
|
| The error "severity" passed to the method is a human-readable severity
| level such as "Parsing Error", "Fatal Error", etc.
|
| A simple logging system has been setup for you. By default, all errors
| will be logged to the application/log.txt file.
|
*/
'log' => false,
'logger' => function($severity, $message)
{
System\File::append(APP_PATH.'storage/log.txt', date('Y-m-d H:i:s').' '.$severity.' - '.$message.PHP_EOL);
},
);
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment