On Mon, 5 May 2014, Thomas D. wrote:

Hi,

I am currently porting a rsyslog configuration to RainerScript syntax
for rsyslog-7.6.3.

I converted

1: *.=debug;\
2:      auth,authpriv.none;\
3:      news.none;mail.none /var/log/debug

into

1: *.=debug;\
2: auth,authpriv.none;\
3: news.none;mail.none action(
4:      type="omfile"
5:      File="/var/log/debug"
6: )

but I am getting the following error:

# /usr/sbin/rsyslogd -N 1 -f /etc/rsyslog.conf
rsyslogd: version 7.6.3, config validation run (level 1), master config
/etc/rsyslog.conf
rsyslogd: error during parsing file /etc/rsyslog.conf, on or before line
3: invalid character '(' in object definition - is there an invalid
escape sequence somewhere? [try http://www.rsyslog.com/e/2207 ]
rsyslogd: error during parsing file /etc/rsyslog.conf, on or before line
3: invalid character '1' in object definition - is there an invalid
escape sequence somewhere? [try http://www.rsyslog.com/e/2207 ]
rsyslogd: error during parsing file /etc/rsyslog.conf, on or before line
3: invalid character '2' in object definition - is there an invalid
escape sequence somewhere? [try http://www.rsyslog.com/e/2207 ]
rsyslogd: error during parsing file /etc/rsyslog.conf, on or before line
3: invalid character '2' in object definition - is there an invalid
escape sequence somewhere? [try http://www.rsyslog.com/e/2207 ]
rsyslogd: error during parsing file /etc/rsyslog.conf, on or before line
3: syntax error on token ')' [try http://www.rsyslog.com/e/2207 ]

The following syntax is working:

1: *.=debug;auth,authpriv.none;news.none;mail.none action(
2:      type="omfile"
3:      File="/var/log/debug"
4: )

So is this syntax ("\" for line breaks in conjunction with RainerScript
actions) not supported or is it a bug?

it's not supported, it's also not needed.

rsyslog treats newlines like any other whitespace inside a statement

(yeah, I've been caught by it as well)

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
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.

Reply via email to