[pmg-devel] [PATCH pmg-api] reduce the logging level of certain messages

Maximiliano Sandoval m.sandoval at proxmox.com
Fri Sep 22 11:58:32 CEST 2023


The (re)started messages happen whenever the service is started. These
messages do not indicate any error.

Signed-off-by: Maximiliano Sandoval <m.sandoval at proxmox.com>
---
 src/bin/pmg-smtp-filter | 4 ++--
 src/bin/pmgpolicy       | 4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/bin/pmg-smtp-filter b/src/bin/pmg-smtp-filter
index 13da635..7da3de8 100755
--- a/src/bin/pmg-smtp-filter
+++ b/src/bin/pmg-smtp-filter
@@ -366,7 +366,7 @@ sub load_config {
     my $prop = $self->{server};
 
     if ($self->{ruledb}) {
-	$self->log (0, "reloading configuration $database");
+	$self->log ('info', "reloading configuration $database");
 	$self->{ruledb}->close ();
     }
 
@@ -426,7 +426,7 @@ sub pre_loop_hook {
 
     $prop->{log_level} = 3;
 
-    $self->log (0, "Filter daemon (re)started (max. $max_servers processes)");
+    $self->log ('info', "Filter daemon (re)started (max. $max_servers processes)");
 
     eval {  PMG::MailQueue::cleanup_active(); };
     $self->log (0, "Cleanup failures: $@") if $@;
diff --git a/src/bin/pmgpolicy b/src/bin/pmgpolicy
index 38c3621..df2e66f 100755
--- a/src/bin/pmgpolicy
+++ b/src/bin/pmgpolicy
@@ -290,7 +290,7 @@ sub pre_loop_hook {
 
     $prop->{log_level} = 3;
 
-    $self->log(0, "Policy daemon (re)started");
+    $self->log('info', "Policy daemon (re)started");
 
     $SIG{'USR1'} = sub {
 	# reloading server configuration
@@ -315,7 +315,7 @@ sub load_config {
     my $prop = $self->{server};
 
     if ($self->{ruledb}) {
-	$self->log(0, "reloading configuration $database");
+	$self->log('info', "reloading configuration $database");
 	$self->{ruledb}->close();
     }
 
-- 
2.39.2





More information about the pmg-devel mailing list