Balazs Scheidler <bazsi77@gmail.com> writes:
what about introducing a template function that expands to the number of elements in the context?
Mmm... that would require extending LogTemplate, and would also mean we have to expand templates in dbparser at action calling time, which sounds inefficient to me. Although things like <action when="$(<= ${.context.count} 10)"> looks cool, it would take quite a bit of work to get that done right I believe, and its performance would, in my opinion, be rather poor. So I'd rather have something like <action when-msg-count="<= N">, without the template magic first. Pros of when-msg-count: - Less code to implement - Better performance Cons: - Less flexible So.. lets have when-msg-count first, and later - if so need be - expand it towards a generic when=, at which point when-msg-count could become a thin, backward-compatibility wrapper around "when". -- |8]