> -----Original Message-----
> From: [email protected] [mailto:rsyslog-
> [email protected]] On Behalf Of David Lang
> Sent: Monday, January 28, 2013 11:46 AM
> To: rsyslog-users
> Subject: Re: [rsyslog] v5 and v7 configuration syntax
>
> On Mon, 28 Jan 2013, Ben Bradley wrote:
>
> > Hi everyone
> >
> > I'm a bit confused about rsyslog configuration syntax, specifically what to
> use where.
> >
> > I read that there's been a change in syntax at some point. I'm using rsyslog
> 7 on CentOS from the adiscon repo but the header at the top of the config
> file says it's a v5 format config file. I thought that with v7 there was a new
> style of configuration syntax that had to be used.
>
> you don't need to use the v7 syntax, it's an option. You can continue to use
> the older syntax (and even mix the two, although it's easy to get confused)
I think it depends... If you have very simple things to do, the old style is
probably still best. For example, I personally find
mail.info /var/log/mail.log
far simpler then
if prifilt("mail.info") then
action(type="omfile" file="/var/log/mail.log)
Of course, if you do complex things, like specifying queue parameters, multiple
actions with a single filter, etc, etc, the new syntax has big advantages. ...
but for very simple cases... not sure. That's the reason that I told andre
there is no need to change the default conf (remember: people are used to that
old format!). But I'llhave a look and check if there are "non-simple"
constructs inside it.
Rainer
>
> > Is there an example of a default Rsyslog v7 config file anywhere?
> > I'm not sure where the action() statement in v7 syntax needs to go in a v5-
> style configuration file. Do I need to put them before or inside the ####
> begin forwarding rule #### comment blocks.
> >
> > Is there a full reference or comparisons of the v7 syntax anywhere?
>
> The rsyslog documenation has a lot of v7 config examples. I haven't seen a
> direct v5 to v7 config translater, but there was a post on how v7 syntax could
> help simplify configs that may help
>
> http://www.rsyslog.com/filter-optimization-with-arrays/
>
> 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.
_______________________________________________
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.