Merge pull request #2892 from silverstripe/log_formatter_defaults

Adding defaults for unhandled event priorities in log formatters.
This commit is contained in:
Ingo Schommer 2014-02-24 21:48:10 +13:00
commit 8ab0fd879d
2 changed files with 6 additions and 1 deletions

View File

@ -23,6 +23,9 @@ class SS_LogErrorEmailFormatter implements Zend_Log_Formatter_Interface {
$errorType = 'Notice'; $errorType = 'Notice';
$colour = 'grey'; $colour = 'grey';
break; break;
default:
$errorType = $event['priorityName'];
$colour = 'grey';
} }
if(!is_array($event['message'])) { if(!is_array($event['message'])) {

View File

@ -26,6 +26,8 @@ class SS_LogErrorFileFormatter implements Zend_Log_Formatter_Interface {
case 'NOTICE': case 'NOTICE':
$errtype = 'Notice'; $errtype = 'Notice';
break; break;
default:
$errtype = $event['priorityName'];
} }
$urlSuffix = ''; $urlSuffix = '';