Hi all,

I'm developing a logging API for use by my company and am hoping I can
use Log4J to implement this API.  One of the requirements I must satisfy
is that the logging tool I develop must do its processing in a separate
thread from the code that calls it.

To do so, I'm thinking that I can extend the Category class and
overwrite the forcedLog() method to create the LoggingEvent object and
then add it to a Vector which is a class variable.  I would then also
have this class implement Runnable and in the Run() method I could have
a loop which pulls LoggingEvent objects off the Vector and invokes the
callAppenders() method on them.

Has anyone tried something similar and maybe have a better solution for
how to do this?  It occurs to me that having Log4J do most of its
processing in a seperate thread might also improve its performace.
Especially when you want to get location information on the caller.  Is
there a reason that Log4J does not do so?

Thanks,

Alan Robertson
[EMAIL PROTECTED]
InfoNow Corp.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to