public inbox for pmg-devel@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 v2 3/5] fix #3657: api: tracking center: explicitly set input base from config
Date: Tue,  9 Jun 2026 22:04:45 +0200	[thread overview]
Message-ID: <20260609200637.904334-4-s.ivanov@proxmox.com> (raw)
In-Reply-To: <20260609200637.904334-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-09 20:07 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-09 20:04 [PATCH pmg-api/pmg-docs/pmg-gui v2 0/5] tracking-center: make input-base configurable Stoiko Ivanov
2026-06-09 20:04 ` [PATCH pmg-api v2 1/5] config: add root_only paramter option Stoiko Ivanov
2026-06-10 16:26   ` Max R. Carrara
2026-06-09 20:04 ` [PATCH pmg-api v2 2/5] config: add log-tracker-base key Stoiko Ivanov
2026-06-10 16:26   ` Max R. Carrara
2026-06-09 20:04 ` Stoiko Ivanov [this message]
2026-06-09 20:04 ` [PATCH pmg-gui v2 4/5] fix #3657: system options: add log-tracker-base textrow Stoiko Ivanov
2026-06-10 16:26   ` Max R. Carrara
2026-06-09 20:04 ` [PATCH pmg-docs v2 5/5] pmg-log-tracker: mention that input-base can be configured via GUI Stoiko Ivanov
2026-06-10 16:26   ` Max R. Carrara
2026-06-10 16:26 ` [PATCH pmg-api/pmg-docs/pmg-gui v2 0/5] tracking-center: make input-base configurable Max R. Carrara
2026-06-12 17:43 ` superseded: " 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=20260609200637.904334-4-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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal