> If I read it correctly, a statsobj is used to get a snapshot,
> represented as a string like "key=value ...", of the counters
> registered by AddCounter(). The status string is fetched by
> getStatsLine(). In this respect, AddCounter() should be a read-only
> function. Should I found that the statsobj is useless, it could be
> unplugged simply by comment out AddCounter() instead of twisting
> additional lines to guarantee initialization. So in my opinion, the
> side effect of AddCounter() is a bad idea and should be avoided. Then
> we fall back to STATSCOUNTER_INIT() explicitly. The statsobj may be
> extended to retrieve internal variables which are not essentially a
> dedicated counter, iQueueSize be an example?
> 
> The counter intialization even could be put together with, say, queue
> initialization code, so that no need of mutex is required.
> 
> How do you think about it?

I just made a couple of commits to implement this:

http://git.adiscon.com/?p=rsyslog.git;a=shortlog;h=refs/heads/v5-stable-newst
ats

Thanks!

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

Reply via email to