On Wed, Oct 23, 2013 at 11:27 AM, Pavel Levshin <[email protected]>wrote:
> 23.10.2013 12:55, Rainer Gerhards: > > > This code will execute correctly if msg contains either "tag1", "trag2" >> or none of them, but will trigger an runtime-error if msg contains both >> "tag1" and "tag2" (as it violates the constraint). >> >>> This restriction does not seem useful to me. >>> >> >> Besides that you think it is not useful, do you think it hurts some use >> case? Could you accept this restriction? >> >> >> > Yes, it does not change anything. You can always reformulate it as: > > > if $msg contains "tag1" then > set $.glob = "1"; > > if $msg contains "tag2" then > set $.glob = "2"; > > set $/glob = $.glob; > > OK, this was just a example. I am looking if someone sees anything that will break potential use case. Just one other example where this may happen: set $/g = $/g + 1; if $/g == 4 then set $/g = 0; you can re-formulate this as if $/g < 4 then set $/g = $/g + 1; else set $/g = 0; So it is not the perfect sample either. But I am thinking if there are cases along these lines where we may get into troubles. > But I still wonder what it's worth. > > thought excerse. Let's first see if the relaxed condition can be used. If not even the relaxed form can, than the more strict form is obviously much less acceptable. But so to get more concrete, if you prefer: would it be OK if a state variable could be accessed only once? Or would it cause trouble? Maybe I am asking about the relaxed form because we already know that one-time access gives us trouble: there would be no obvious solution for my example above other than creating a specific sequence() function (what of course is a solution, but the question is: can we get along with a less intrusive approch)? So I am just trying to find some limits. As I said, after that I'd like to think about actual implementation. Rainer > > -- > Pavel Levshin > > ______________________________**_________________ > rsyslog mailing list > http://lists.adiscon.net/**mailman/listinfo/rsyslog<http://lists.adiscon.net/mailman/listinfo/rsyslog> > http://www.rsyslog.com/**professional-services/<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.

