From: Karel Zak <kzak@redhat.com>
To: kerolasa@gmail.com
Cc: Rainer Gerhards <rgerhards@gmail.com>,
util-linux <util-linux@vger.kernel.org>
Subject: Re: logger --tag
Date: Wed, 11 Mar 2015 13:03:37 +0100 [thread overview]
Message-ID: <20150311120337.GG26473@ws.net.home> (raw)
In-Reply-To: <CAG27Bk2-7N=dFfFYEnC2yudasyg1v3mLLQ6mN4uOFzOOLSAHdA@mail.gmail.com>
On Wed, Mar 11, 2015 at 09:56:41AM +0000, Sami Kerola wrote:
> there are lessons to be learned;
Cool! :-)
> > Spaces are invalid inside a tag value (rfc 3164, rfc5424 and
> > traditional log socket format). The lead to misinterpretation. In the
> > case of rsyslog, the problem is not easily visible to the casual
> > observer, but can cause problems e.g. when writing logs to databases
> > or other tabular frontends.
in other words, it's always mistake to use space in tags.
...
> > 1) be to be strict by default, and emit an error message if a space is
> > contained inside a tag value. But that could potentially break
> > existing scripts.
> >
> > 2) be strict if and only if --rfc5424 is selected, but keep lazy in
> > all other cases
> >
> > 3) be strict if any rfc format is specified, but keep lazy in all other cases.
> >
> > 4) add a new option --strict (or whatever) and emit an error if it
> > either --rfc3164, --rfc5424 *or* --strict is given (--strict would
> > only affect system log socket format).
> >
> > Options 2 to 4 would not break existing scripts, as these are new 2.26
> > options. I tend to option 4, which has the only downside that we still
> > permit invalid format to the local log socket.
> >
> > What is the opinion here on this list?
I vote for 4) and describe the problem in man page and hightlight in
the man page that --strict is automatically enabled for all --rfc*
formats.
> How about adding a check, and a warning something like
>
> warnx(_("invalid tag formats are not allowed after 2018, see man logger(1)"));
Frankly, I don't like when utils produce some extra warnings, it will
generate mess and many many warnings on systems where the space-in-tag
is no problem and where all works as expected for years.
Karel
--
Karel Zak <kzak@redhat.com>
http://karelzak.blogspot.com
prev parent reply other threads:[~2015-03-11 12:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-03-10 17:32 logger --tag Rainer Gerhards
2015-03-11 9:56 ` Sami Kerola
2015-03-11 12:03 ` Karel Zak [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=20150311120337.GG26473@ws.net.home \
--to=kzak@redhat.com \
--cc=kerolasa@gmail.com \
--cc=rgerhards@gmail.com \
--cc=util-linux@vger.kernel.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