> -----Original Message-----
> From: [email protected] [mailto:rsyslog-
> [email protected]] On Behalf Of Mr. Demeanour
> Sent: Friday, June 25, 2010 9:03 AM
> To: rsyslog-users
> Subject: Re: [rsyslog] feedback requested: NEW rsyslog.conf format --
> XML?
> 
> Mr. Demeanour wrote:
> >
> > Hmmm. It struck me a few-dozen posts back in this thread that the
> > configfile language perhaps *needs* to be a full language.
> >
> > Many perl and PHP apps have config files that are really data
> > declarations in perl or PHP; I thought of suggesting a configfile
> > written in perl. Then I reconsidered.
> >
> > Could you elaborate your objection to using JSON? you say you
> > "question" it, but we haven't seen your question.
> >
> Apologies for commenting on my own post.
> 
> I note the objections to XML as a configuration language. Generally
> these seem to be concerned with the difficulty of reading and editing
> XML "as she is wrote", i.e. a UTF-8 document full of <> crows-feet,
> with
> tags, attributes, processing-instructions, namespace-declarations and
> all that.
> 
> I'm not sure if I'm being technically correct; but the essence of an
> XML
> document is a DOM tree, not any specific rendition of that tree. Given
> some restricted XML-based notation (such as the notation for an rsyslog
> configuration, for example) there's no intrinsic reason why the XML
> document shouldn't be 'flattened' for storage, and represented as
> something like an INI file. For config data, I favour flatness. I don't
> think it's at all a good idea to be able to express if/then/else
> constructs in a config file; that belongs in the code. The
> configuration
> should be a static thing.

It's not the configuration that needs if-then-else in the sense that some
part of the config is used versus another. It is that the configuration needs
to specify rule execution (filters!) and these have an if-then-else
structure. In fact, that was quite often requested and the current discard
action is a work-around for some of the use cases. 

So we need to differentiate between 

a) if-then-else in the config language for config purposes
and
b) if-then-else for building rulesets (which then essentially become
ruletrees vs. the rulelists they are today)

I agree that a) is probably not desirable, but b) is essential. It is this
argument that I have against using Lua, which IMHO addresses only a), which
is not needed at least.

Rainer
_______________________________________________
rsyslog mailing list
http://lists.adiscon.net/mailman/listinfo/rsyslog
http://www.rsyslog.com

Reply via email to