[syslog-ng] Re: Logging to program destinations has odd prefix?
Balazs Scheidler
bazsi at balabit.hu
Sat Jul 15 17:53:03 CEST 2006
On Fri, 2006-07-14 at 10:04 -0700, John Caruso wrote:
> On Friday 05:24 AM 7/14/2006, Balazs Scheidler wrote:
> > > I'd think that as the default it would make more sense to generate
> > > messages just as they would have been generated with a file()
> > destination
> > > and to require users who actually want the priority prefix (or any
> > other
> > > special handling) to use a template to get it, rather than requiring
> > it to
> > > be stripped out by default.
> >
> >And what happens to those users who are using the current format in
> >their scripts?
>
> They'd use a template, of course. My general point was just that it's
> better to design for the rule rather than the exception, especially when
> the resulting behavior is unexpected and (apparently) not documented. It
> doesn't matter much to me anymore since I've already spent the time
> tracking down/testing this behavior (since I initially thought it might be
> a problem with *my* script) and then working around it.
1) it might be a rule for you and an exception for others. I would not
think that this behaviour is unexpected, a lot of applications require
priority information, some users even add this information to their log
files, as otherwise it'd be lost. I agree that it is unexpected if you
are using program() to send out alerts, but that's not necessarily the
primary purpose.
2) changing the way it currently works would break systems that already
rely on this behaviour. I don't want to break their systems.
For a critical software like syslog-ng, a suboptimal feature is way
better than a regression. And there's a clean solution for those you
don't want the priority information. In 2.0.x you can even define your
template once and use it for several destinations.
--
Bazsi
More information about the syslog-ng
mailing list