Added "logger" option to error configuration.
This commit is contained in:
parent
3f20c10d02
commit
f54ef2b4c9
|
@ -14,7 +14,7 @@
|
|||
|
|
||||
*/
|
||||
|
||||
'detail' => true,
|
||||
'detail' => false,
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
|
@ -24,11 +24,32 @@
|
|||
| 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);
|
||||
},
|
||||
|
||||
);
|
Loading…
Reference in New Issue