> -----Original Message-----
> From: [email protected] [mailto:rsyslog-
> [email protected]] On Behalf Of Gregory K. Ruiz-Ade
> Sent: Friday, October 21, 2011 1:13 AM
> To: rsyslog-users
> Subject: Re: [rsyslog] pri-text property incorrectly appending pri?
> 
> On Oct 20, 2011, at 2:58 AM, Rainer Gerhards wrote:
> 
> >> -----
> >> :pri-text, !isequal, "local0.err" ~
> >> *.* /var/log/local0.err.log
> >> -----
> >
> > Anybody with suggestions?
> 
> I'm all for fixing it so the code only emitted "%s", but that's me. :)

I'll change that today in v6 as of David's suggestion.

> 
> > As a side-note, using
> >
> > local0.err /var/log/local0.err.log
> 
> 
> Oh, I understand. Above was basically a vast simplification of what was
> in my rules just to illustrate the point, 

I appreciate these simplifications, as they make helping you much easier ;) I
just wanted to make sure you are aware of the performance differences (many
folks are not).

> and I could have even written
> it as:
> 
> :pri-text, isequal, "local0.err" /var/log/local0.err.log

Yes, and it would be more efficient than the if -- but still less efficient
than the simple selector filter.

If you are up for speed, use
- traditional selector
- property 
- script
Filter in that order and go to the next one only if you actually need to. IF
speed doesn't matter, this is obviously unimportant.

Rainer

> 
> for purposes of illustrating the bug as I found it. You are quite
> correct, however, that it's simply a more complicated (filter v.
> selector) way of doing:
> 
> local0.err /var/log/local0.err.log
> 
> To be perfectly honest, that set of rules has since been scrapped for a
> cleaner single if-statement filter at the end of a ruleset with it's
> own disk-backed queues.
> 
> Gregory
> 
> --
> Gregory K. Ruiz-Ade <[email protected]>
> OpenPGP Key ID: EAF4844B  keyserver: pgpkeys.mit.edu
> 
> 
> 
> _______________________________________________
> rsyslog mailing list
> http://lists.adiscon.net/mailman/listinfo/rsyslog
> http://www.rsyslog.com
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com

Reply via email to