On Tue, 11 Sep 2012, Radu Gheorghe wrote:
Hi to all rsysloggers :)
If I want to configure my rsyslog 6.4.1 to do something like:
if $msg contains '|\/|onster' then /var/log/monster
it fails giving something like:
7434.868138334:7fbd708fd700: invalid char in expr: '
7434.868146274:7fbd708fd700: XXXX: msg: syntax error
I get the same error if I use a double-backslash there:
if $msg contains '|\\/|onster' then /var/log/monster
So my question is: how to escape the backslash and avoid the syntax error?
Any clues will be deeply appreciated :)
one common problem is single vs double quotes. I always get mixed up over
which is supported and which is 'reserved for future use'. so my fitst
suggestion would be to try double quotes. the fact that the error seems to
be complaining about the single quote also makes me think this may be the
issue.
David Lang
_______________________________________________
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