public inbox for pmg-devel@lists.proxmox.com
 help / color / mirror / Atom feed
From: Thomas Lamprecht <t.lamprecht@proxmox.com>
To: Stoiko Ivanov <s.ivanov@proxmox.com>, Oguz Bektas <o.bektas@proxmox.com>
Cc: pmg-devel@lists.proxmox.com
Subject: Re: [pmg-devel] [PATCH pmg-log-tracker] fix #3657: allow parsing mail.log files
Date: Wed, 6 Oct 2021 15:41:11 +0200	[thread overview]
Message-ID: <b9d8143c-62ff-595e-fcc6-58c543bf3f6f@proxmox.com> (raw)
In-Reply-To: <20211006152802.76d6f076@rosa.proxmox.com>

On 06.10.21 15:28, Stoiko Ivanov wrote:
> On Wed, 6 Oct 2021 13:51:53 +0200
> Thomas Lamprecht <t.lamprecht@proxmox.com> wrote:
> 
>> On 06.10.21 13:46, Oguz Bektas wrote:
>>> with an optional "--maillog" parameter, we parse /var/log/mail.log.*
>>> instead of /var/log/syslog.*  
>> --mail-log
>>
>> and it may make sense to allow passing a base path to that, that would also allow easier
>> evaluation like copy of the logs from the production system and run queries on another,
>> not so important, system.
> +1 for providing a base-path - I'd even go one further and let it deal
> with the optionally gzipped logs by matching the filename (for .gz)
> instead of the 'index' (assuming that the first and second file are not
> compressed, and all consecutive files are).

yeah we can also try either match on every, that way we can better cope with
custom logrotation settings that may gzip only after .3 or so.

All that would be relatively easy to do by implementing the iterator trait for
a struct with a "base_path" member.

> 
> With that (and the assumption that `logrotate` is used) this would
> probably be usable in a configurable way for the GUI+Tracking Center)
> 
> Question is from a UX point of view how much a '-i' for single logfile and
> a '--mail-log' for a pattern of logfiles makes sense.
> 
> 

You have a point there.

First, generally my opinion is that not every option needs a short-op, as that is
something that often leads to some weird excuses/arguments for a specific letter which
a user may the see different.
 
As input is `-i` or `--inputfile` it may be sensible to use --input-base or --input-series
We already use minus as separator in a few places (--message-id, --queue-id, --search-string)
so IMO cannot really care to much for consistency here, and I'd just avoid the short opt for
this rather specific option.





      reply	other threads:[~2021-10-06 13:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-06 11:46 Oguz Bektas
2021-10-06 11:51 ` Thomas Lamprecht
2021-10-06 13:28   ` Stoiko Ivanov
2021-10-06 13:41     ` Thomas Lamprecht [this message]

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=b9d8143c-62ff-595e-fcc6-58c543bf3f6f@proxmox.com \
    --to=t.lamprecht@proxmox.com \
    --cc=o.bektas@proxmox.com \
    --cc=pmg-devel@lists.proxmox.com \
    --cc=s.ivanov@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