From: Mira Limbeck <m.limbeck@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [pmg-devel] [PATCH pmg-api] dkim: add QID in warnings
Date: Thu, 29 Feb 2024 14:47:53 +0100 [thread overview]
Message-ID: <20240229134752.170724-1-m.limbeck@proxmox.com> (raw)
adding the QID in warnings allows those log lines to be picked up by the
pmg-log-tracker. this way the warnings show up in the tracking center.
Signed-off-by: Mira Limbeck <m.limbeck@proxmox.com>
---
src/PMG/RuleDB/Accept.pm | 8 ++++++--
src/PMG/RuleDB/BCC.pm | 8 ++++++--
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/src/PMG/RuleDB/Accept.pm b/src/PMG/RuleDB/Accept.pm
index d14c2fb..e3e39a7 100644
--- a/src/PMG/RuleDB/Accept.pm
+++ b/src/PMG/RuleDB/Accept.pm
@@ -104,8 +104,12 @@ sub execute {
eval {
$entity = PMG::DKIMSign::sign_entity($entity, $dkim, $msginfo->{sender});
};
- syslog('warning',
- "Could not create DKIM-Signature - disabling Signing: $@") if $@;
+ if ($@) {
+ syslog('warning',
+ "%s: Could not create DKIM-Signature - disabling Signing: $@",
+ $queue->{logid}
+ );
+ }
}
diff --git a/src/PMG/RuleDB/BCC.pm b/src/PMG/RuleDB/BCC.pm
index 65b6fb5..81301cf 100644
--- a/src/PMG/RuleDB/BCC.pm
+++ b/src/PMG/RuleDB/BCC.pm
@@ -144,8 +144,12 @@ sub execute {
eval {
$entity = PMG::DKIMSign::sign_entity($entity, $dkim, $msginfo->{sender});
};
- syslog('warning',
- "Could not create DKIM-Signature - disabling Signing: $@") if $@;
+ if ($@) {
+ syslog('warning',
+ "%s: Could not create DKIM-Signature - disabling Signing: $@",
+ $queue->{logid}
+ );
+ }
}
if ($msginfo->{testmode}) {
--
2.39.2
next reply other threads:[~2024-02-29 13:48 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-29 13:47 Mira Limbeck [this message]
2024-02-29 14:25 ` [pmg-devel] applied: " Stoiko Ivanov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240229134752.170724-1-m.limbeck@proxmox.com \
--to=m.limbeck@proxmox.com \
--cc=pmg-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox