From 6318a3aea13e2d4b13654d126e268222bd958ce6 Mon Sep 17 00:00:00 2001 From: Frank Wall Date: Sat, 27 Jul 2024 22:47:59 +0200 Subject: [PATCH] security/acme-client: fix log severity, closes #3955 --- security/acme-client/pkg-descr | 1 + .../opnsense/mvc/app/library/OPNsense/AcmeClient/LeAccount.php | 2 +- .../opnsense/mvc/app/library/OPNsense/AcmeClient/LeUtils.php | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/security/acme-client/pkg-descr b/security/acme-client/pkg-descr index f9eafa908..1573627ff 100644 --- a/security/acme-client/pkg-descr +++ b/security/acme-client/pkg-descr @@ -13,6 +13,7 @@ Plugin Changelog Fixed: * fix empty System Log * avoid unnecessary error log messages (#3860) +* don't log errors for successful commands (#3955) 4.4 diff --git a/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeAccount.php b/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeAccount.php index 7ff90ceda..5443f60bb 100644 --- a/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeAccount.php +++ b/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeAccount.php @@ -228,7 +228,7 @@ class LeAccount extends LeCommon $this->fixConfig(); // Update account status. - LeUtils::log_error('account registration successful for ' . $this->config->name); + LeUtils::log_debug('account registration successful for ' . $this->config->name); $this->setStatus(200); } else { LeUtils::log_debug('account already registered: ' . (string)$this->config->name, $this->debug); diff --git a/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeUtils.php b/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeUtils.php index abc57c4e5..e4ed20c78 100644 --- a/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeUtils.php +++ b/security/acme-client/src/opnsense/mvc/app/library/OPNsense/AcmeClient/LeUtils.php @@ -209,7 +209,7 @@ class LeUtils // Get exit code $result = proc_close($proc); - log_error(sprintf("AcmeClient: The shell command returned exit code '%d': '%s'", $result, $proc_cmd)); + log_debug(sprintf("AcmeClient: The shell command returned exit code '%d': '%s'", $result, $proc_cmd)); return($result); } else { log_error(sprintf("AcmeClient: Unable to prepare shell command '%s'", $proc_cmd));