> I've been convinced on the declare wherever argument by yourself and > RB. But as a clarification on this point: I think it should be easy > to tell what is a declaration and what is an application. > > For example, if I define an action queue in the global scope, its a > declaration because i MUST reference that declaration in order for it > to do anything. That's a declaration. > > Defining an action queue in a ruleset appears to be an application - > it does not require later reference - and thus isn't a declaration. > > I think that when looking at the config, it should be clear what is a > declaration and what is an application. > > Does that explain it better?
Definitely, and it permits me to provide some new argument :) My goal in designing the new config language is to have the ability that things do not necessarily be defined upfront. Thus I insisted on the capability to declare actions *right* inside the rule. The idea is that we often have situation (very often indeed) that an action is used only once. I find it somewhat unintuitive (and error-prone) when one needs to declare and name the action first, just to use it one time. In that sense, I'd like to have the capability to declare such objects in scope. But on the other hand, if you use the same action in 5 rules, it is more natural (and even important from a code POV) to declare it just once and then re-use it. Thus declare it globally and reuse it inside the rules. Of course, this system can be abused (declare & name action inside a scope and reuse it in another scope), but with great power always comes great ability to screw up ;) That would definitely not be a recommended config (bug I would not forcefully try to forbid it, it would complicate the parser). So, in short, I'd like to have the ability to do <rule> ... <action type=omwhatever> ... </action> # a one-timer </rule> as well as <action name=multiuse type=omwhatver>...</action> <rule> ... <action use=multiuse> </rule> <rule> ... <action use=multiuse> </rule> <rule> ... <action use=multiuse> </rule> Rainer _______________________________________________ rsyslog mailing list http://lists.adiscon.net/mailman/listinfo/rsyslog http://www.rsyslog.com

