From bcf8e4f6c1a93dcfef5e3cf30a3d9d348da131ff Mon Sep 17 00:00:00 2001 From: Ad Schellevis Date: Fri, 7 Jan 2022 19:23:37 +0100 Subject: [PATCH] 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 --- .../controllers/OPNsense/Diagnostics/LogController.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/opnsense/mvc/app/controllers/OPNsense/Diagnostics/LogController.php b/src/opnsense/mvc/app/controllers/OPNsense/Diagnostics/LogController.php index b46ca46ae..7055dd007 100644 --- a/src/opnsense/mvc/app/controllers/OPNsense/Diagnostics/LogController.php +++ b/src/opnsense/mvc/app/controllers/OPNsense/Diagnostics/LogController.php @@ -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;