Does log4j.Logger count logging events ?
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Nicolai_Hoge
Posted On:   Thursday, March 27, 2003 03:26 AM

Is there a way to get the number of times you have called each log method on a Logger, in Log4j ?
Say that my application has called log.warn() 100 times,
and log.error 75 times. DO I have to keep track of that in my own code, or does log4j do it for me ?
If I have to keep track of it myself, then I guess creating a subclass of Logger would be a good way of going about it ?

Re: Does log4j.Logger count logging events ?

Posted By:   Anonymous  
Posted On:   Friday, March 28, 2003 01:58 AM

Logger doesn´t do the job, because usually it isn´t necessary. You can create a new Logger class, ok. But I would append the events to a file (you only need the priority for this) and analyse that file. "How often the string 'WARN' exist?". Shouldn´t be difficult.
About | Sitemap | Contact