mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #2892 from silverstripe/log_formatter_defaults
Adding defaults for unhandled event priorities in log formatters.
This commit is contained in:
commit
8ab0fd879d
@ -23,6 +23,9 @@ class SS_LogErrorEmailFormatter implements Zend_Log_Formatter_Interface {
|
||||
$errorType = 'Notice';
|
||||
$colour = 'grey';
|
||||
break;
|
||||
default:
|
||||
$errorType = $event['priorityName'];
|
||||
$colour = 'grey';
|
||||
}
|
||||
|
||||
if(!is_array($event['message'])) {
|
||||
|
@ -15,7 +15,7 @@ class SS_LogErrorFileFormatter implements Zend_Log_Formatter_Interface {
|
||||
$errfile = $event['message']['errfile'];
|
||||
$errline = $event['message']['errline'];
|
||||
$errcontext = $event['message']['errcontext'];
|
||||
|
||||
|
||||
switch($event['priorityName']) {
|
||||
case 'ERR':
|
||||
$errtype = 'Error';
|
||||
@ -26,6 +26,8 @@ class SS_LogErrorFileFormatter implements Zend_Log_Formatter_Interface {
|
||||
case 'NOTICE':
|
||||
$errtype = 'Notice';
|
||||
break;
|
||||
default:
|
||||
$errtype = $event['priorityName'];
|
||||
}
|
||||
|
||||
$urlSuffix = '';
|
||||
|
Loading…
Reference in New Issue
Block a user