2012/9/13 Rainer Gerhards <[email protected]>: > > >> -----Original Message----- >> From: [email protected] [mailto:rsyslog- >> [email protected]] On Behalf Of Radu Gheorghe >> Sent: Thursday, September 13, 2012 3:26 PM >> To: rsyslog-users >> Subject: Re: [rsyslog] How to escape backslash in rainerscript >> if...then conditions >> >> Hi Rainer, >> >> We've been trying with the attached patches and, while I don't get >> configuration errors anymore as I did in the initial post, now the >> "if" conditions don't seem to work at all. For example: >> > > I'll check ASAP, but I have just started work deep in the grammar fort he new > set capability. So it will take a short moment...
Thanks for replying so fast! > >> # cat /etc/rsyslog.conf >> $ModLoad imuxsock >> #works >> #:msg, startswith, " bla" /tmp/works >> #doesn't work >> if $msg startswith ' bla' then action(type="omfile" >> file="/tmp/works") >> >> What I get in the debug log when I do `logger bla` is: > > Could you do a 'logger 'bla bla'" - I just want to outrule that this is an > old bug, where startswith does not proper handle exact matches (I didn't > change anything in that regard, at least I think so ;). Yep. Same outcome. The weird part is that I've tried with "stock" 6.4.1 and I get the same behavior. So either I'm doing something horribly wrong, or the regression was introduced earlier. Best regards, Radu _______________________________________________ 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.

