Framework - Logging : when the default severity level is different than "Warning" because the application doesn't send anything else out, make sure to push these defaults via the controller. style fix previous

This commit is contained in:
Ad Schellevis 2022-01-07 19:23:37 +01:00
parent b39b8f22c9
commit bcf8e4f6c1

View File

@ -41,21 +41,15 @@ class LogController extends IndexController
$this->view->module = $module;
$this->view->scope = $scope;
$this->view->service = '';
$this->view->default_log_severity = "Warning";
$service = $module == 'core' ? $scope : $module;
/* XXX manually hook different severity for specific cases */
/* XXX manually hook up known services and log severities for now */
switch ($service) {
case 'filter':
$this->view->default_log_severity = "Informational";
break;
default:
$this->view->default_log_severity = "Warning";
break;
}
/* XXX manually hook up known services for now */
switch ($service) {
case 'ipsec':
$this->view->service = 'ipsec';
break;