[syslog-ng]fallback with override?

Mike Nerone syslog-ng@lists.balabit.hu
Thu, 1 Apr 2004 15:54:39 -0600


I want to do something very simple that should be easily configurable, but I
can't figure out how to do it. Here's a greatly simplified example that
illustrates my need: I want to log specific filters to specific
destinations, with a fallback to catch anything non-specific, but ALSO to to
log *everything* to the console (I would not do thise in practice, of
course, but it should be doable). My first obvious thought was to use this
(again, this is very simplified - I don't want anyone to think this would be
my real syslog config - that would be embarrassing :D):

  log { source(src); filter(cron); destination(cron); }; # Catch cron stuff
  log { source(src); destination(messages); flags(fallback); }; # Everything
else
  log { source(src); destination(console); }; # But no matter what,
*everything* to console

I assumed that the "fallback" would log anything not caught by a *previous*
non-fallback log statement (the fact that the 'final' flag exists suggested
to me that ordering was observed), but that does not appear to be the case.
Everything does indeed get logged to the console with that config, but the
fallback log gets *nothing* (ostensibly because all messages are caught by
the console log statement).

Can anyone think of a way to do this (I'm probably missing the obvious
here)? Or perhaps the fallback algorithm could/should be modified to observe
ordering (i.e. ignore log statements that appear after the fallback log
statement in the config)?

Mike Nerone
 
/* The only secure computer is one that is unplugged from the network -- and
the wall. */

<Activism>Did you know that our brilliant legislators recently (and quietly)
legalized spam? The law now says that anyone who wants to *can* spam with no
fear of punishment. They even named the law the "CAN SPAM" Act. Read about
it at http://www.cauce.org/news/index.shtml, then talk about it with your
congressman.</Activism>