From: "Peter Müller" <peter.mueller@ipfire.org>
To: development@lists.ipfire.org
Subject: Re: [PATCH] log.dat: Fix an error with 'monit' logging too much data.
Date: Tue, 25 Jan 2022 16:53:48 +0000 [thread overview]
Message-ID: <2bab3b1b-11b0-40aa-13e0-4456c6f3c340@ipfire.org> (raw)
In-Reply-To: <20220121170756.3466085-1-matthias.fischer@ipfire.org>
[-- Attachment #1: Type: text/plain, Size: 1141 bytes --]
Reviewed-by: Peter Müller <peter.mueller(a)ipfire.org>
> 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\[.*\]: )',
next prev parent reply other threads:[~2022-01-25 16:53 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 [this message]
2022-01-28 13:20 ` Bernhard Bitsch
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=2bab3b1b-11b0-40aa-13e0-4456c6f3c340@ipfire.org \
--to=peter.mueller@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