Hey that worked thanks!!!
-----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Todd Mortensen Sent: Tuesday, April 16, 2013 12:56 PM To: rsyslog-users Subject: Re: [rsyslog] rsyslog and some programming options Some examples here http://www.rsyslog.com/doc/rsyslog_conf_filter.html But it would be something like this (untested) If $source == 'hostname' and $syslogseverity <= '5' then { *.* ?tempexample1 } else { *.* ?tempexample2 } On Tue, Apr 16, 2013 at 12:47 PM, Josh Bitto <[email protected]> wrote: > I was wondering if when creating an "if" "then" statement rsyslog will > also do "else" > > The reason I'm asking is I'm having a bit of an issue where I'm trying > to separate messages from a specific source to different files. What I > have done is setup a template with an if then statement. > > $template tempexample1,"/var/log/%HOSTNAME%/file1 > $template tempexample2,"/var/log/%HOSTNAME%/file2 > > If > $source == 'hostname' > And > $syslogseverity <= '5' > Then { ?tempexample1 > Else ?tempexample2 > Stop > } > > Is that correct? Cause when I restart the service it fails....I even > tried doing something like $syslogseverity == '6' for the else part. > > > Joshua Bitto > > > > _______________________________________________ > 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. > _______________________________________________ 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. _______________________________________________ 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.

