On Fri, Sep 13, 2013 at 4:45 AM, David Lang <[email protected]> wrote: > On Thu, 12 Sep 2013, Erik Steffl wrote: > > so the property filter version of this would be >>> :$!yummlyLogOrigin!**supportLevel, isempty, '' set $.value="empty"; >>> :$!yummlyLogOrigin!**supportLevel, ! isempty, '' set $.value="not >>> empty"; >>> >> >> any ideas whether this is in any way better or worse compared to: >> >> if $!yummlyLogOrigin!supportLevel == "" then set $.value = "empty" >> >> I assume that after either of those (property filter or if statement) >> the end result is the same ($.value is set to "empty"), is there any >> difference in performance? >> > > with version 7, it should be good, and you have the option for the else > clause, which should be faster than two tests. > > the config optimizer in v7 compiles the config down to the same thing in > either case >
not exactly in this case. It is not (yet?) smart enough to detect that :somevar,contains,"abc" then-part ;somevar,!contains,"abc" else-part means if $somevar contains "abc" then then-part else else-part as such, with the property filter, two tests are done compared to a single one if "if" is used. Rainer > > note, you need a ; at the end of a set command. > > David Lang > > ______________________________**_________________ > rsyslog mailing list > http://lists.adiscon.net/**mailman/listinfo/rsyslog<http://lists.adiscon.net/mailman/listinfo/rsyslog> > http://www.rsyslog.com/**professional-services/<http://www.rsyslog.com/professional-services/> > What's up with rsyslog? Follow https://twitter.com/rgerhards > NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad > of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you > DON'T LIKE THAT. > _______________________________________________ rsyslog mailing list http://lists.adiscon.net/mailman/listinfo/rsyslog http://www.rsyslog.com/professional-services/ What's up with rsyslog? Follow https://twitter.com/rgerhards NOTE WELL: This is a PUBLIC mailing list, posts are ARCHIVED by a myriad of sites beyond our control. PLEASE UNSUBSCRIBE and DO NOT POST if you DON'T LIKE THAT.

