all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pmg-devel@lists.proxmox.com
Subject: [PATCH pmg-api 2/4] fix #3657: api: tracking center: explicitly set input base from config
Date: Mon,  8 Jun 2026 13:29:40 +0200	[thread overview]
Message-ID: <20260608112952.679449-3-s.ivanov@proxmox.com> (raw)
In-Reply-To: <20260608112952.679449-1-s.ivanov@proxmox.com>

makes it possible to override the location of logs which are scanned
by pmg-log-tracker.
This should enable admins, to either point the log-tracker to another
location on disk where e.g. a rsyslog daemon combines the logs of
multiple instances, or to only log the mail-facility somewhere and
drop /var/log/syslog logging in favor of journalling.

pmg-log-tracker still uses syslog-files over the journal, as this was
far more performant when we last compared log-file reading to reading
from the journal.

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
 src/PMG/API2/MailTracker.pm | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/PMG/API2/MailTracker.pm b/src/PMG/API2/MailTracker.pm
index 1cc93ef2..5c175300 100644
--- a/src/PMG/API2/MailTracker.pm
+++ b/src/PMG/API2/MailTracker.pm
@@ -41,6 +41,11 @@ my $statmap = {
 my $run_pmg_log_tracker = sub {
     my ($args, $includelog) = @_;
 
+    my $pmg_cfg = PMG::Config->new();
+    my $input_base = $pmg_cfg->get('admin', 'log-tracker-base');
+
+    push @$args, '--input-base', $input_base;
+
     my $logids = {};
 
     if (defined(my $id = $includelog)) {
-- 
2.47.3





  parent reply	other threads:[~2026-06-08 11:30 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-08 11:29 [PATCH pmg-api/pmg-docs/pmg-gui 0/4] tracking-center: make input-base configurable Stoiko Ivanov
2026-06-08 11:29 ` [PATCH pmg-api 1/4] config: add log-tracker-base key Stoiko Ivanov
2026-06-08 22:37   ` Thomas Lamprecht
2026-06-08 11:29 ` Stoiko Ivanov [this message]
2026-06-08 11:29 ` [PATCH pmg-gui 3/4] fix #2091: system options: add log-tracker-base textrow Stoiko Ivanov
2026-06-08 11:29 ` [PATCH pmg-docs 4/4] pmg-log-tracker: mention that input-base can be configured via GUI Stoiko Ivanov
2026-06-10  9:25 ` superseded: [PATCH pmg-api/pmg-docs/pmg-gui 0/4] tracking-center: make input-base configurable 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=20260608112952.679449-3-s.ivanov@proxmox.com \
    --to=s.ivanov@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal