Your example suggests usage of state variables for counting:

set $/var = $/var + 1;

And, indeed, it will work as expected. Each message will get it's number in shadow copy.

But what if a user tries this (to retain previous value, for example):

set $.local = $/var;
set $/var  = $/var + 1;

$/var will be shadowed at first statement, but modified AND propagated at second one. Therefore, it will count for batches in this case. It looks like propagation must also be restricted to first access only.


--
Pavel Levshin


25.10.2013 11:10, Rainer Gerhards:
Hi all,

I thought out the details of what I have on my mind and think the solution
can work and support all known use cases. I've also managed to write it
down this morning:

http://blog.gerhards.net/2013/10/a-proposal-for-rsyslog-state-variables.html

I would appreciate if you could check it and see how the spec can be
technically broken or identify use cases which it will not be able to
handle.

Looking forward to the discussion!

Rainer
_______________________________________________
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.

Reply via email to