public inbox for development@lists.ipfire.org
 help / color / mirror / Atom feed
From: Bernhard Bitsch <bbitsch@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: [PATCH] log.dat: Fix an error with 'monit' logging too much data.
Date: Fri, 28 Jan 2022 14:20:43 +0100	[thread overview]
Message-ID: <5efccde6-07d0-f0cf-7dc9-d1801694df79@ipfire.org> (raw)
In-Reply-To: <20220121170756.3466085-1-matthias.fischer@ipfire.org>

[-- Attachment #1: Type: text/plain, Size: 1195 bytes --]

Reviewed-by: Bernhard Bitsch <bbitsch(a)ipfire.org>

Am 21.01.2022 um 18:07 schrieb Matthias Fischer:
> Making the regex "non-greedy" fixes an error Jon found.
> 
> 'monit' logged a whole line from '/var/log/messages' where it should only log the first part.
> 
> Reference:
> https://www.ultraedit.com/support/tutorials-power-tips/ultraedit/non-greedy-perl-regex.html
> 
> Signed-off-by: Matthias Fischer <matthias.fischer(a)ipfire.org>
> ---
>   html/cgi-bin/logs.cgi/log.dat | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/html/cgi-bin/logs.cgi/log.dat b/html/cgi-bin/logs.cgi/log.dat
> index 0d6c6722a..3364b7bea 100644
> --- a/html/cgi-bin/logs.cgi/log.dat
> +++ b/html/cgi-bin/logs.cgi/log.dat
> @@ -62,7 +62,7 @@ my %sections = (
>           'ipfire' => '(ipfire: )',
>           'ipsec' => '(ipsec_[\w_]+: |pluto\[.*\]: |charon: |vpnwatch: )',
>           'kernel' => '(kernel: (?!DROP_))',
> -        'monit' => '(monit\[.*\]: )',
> +        'monit' => '(monit\[.*?\]: )',
>           'ntp' => '(ntpd(?:ate)?\[.*\]: )',
>   	'oinkmaster' => '(oinkmaster\[.*\]: )',
>           'openvpn' => '(openvpnserver\[.*\]: |.*n2n\[.*\]: )',

      parent reply	other threads:[~2022-01-28 13:20 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-21 17:07 Matthias Fischer
2022-01-25 16:53 ` Peter Müller
2022-01-28 13:20 ` Bernhard Bitsch [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=5efccde6-07d0-f0cf-7dc9-d1801694df79@ipfire.org \
    --to=bbitsch@ipfire.org \
    --cc=development@lists.ipfire.org \
    /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