Ok, is there a way of my wrapper class starting up, and automatically detecting all the classes available in every package I specify, and then setting up loggers for each one? I mean an easy way. I could just search through all the files, and convert them to class names without the '/' or '\'.

If I could do that, then each class could call "log (message, classname)".

Either that, or I could just have the wrapper class setup a static hashtable of loggers. When a new log request comes in, I can check the classname that's passed into the log method, and use it as lookup into the hashtable of loggers. If it's not there, make it and add it.

What do you guys think?

Also, again I ask, how does commons logging handle this, considering it is a wrapper around logging implementations?

Thorbjørn Ravn Andersen wrote:
Scovetta, Michael V wrote:

(new Throwable()).printStackTrace(pw);


Depending on your JVM this might be extremely slow. Additionally the log4j people (who uses this method too) have found that some JIT's give incorrect stack traces.

Java 1.5 is rumoured to have much better facilities for this.


--
Trenton D. Adams
Web Programmer Analyst
Navy Penguins at your service!
Athabasca University
(780) 675-6195
:wq!

__ This communication is intended for the use of the recipient to whom it
is addressed, and may contain confidential, personal, and or privileged
information. Please contact us immediately if you are not the intended
recipient of this communication, and do not copy, distribute, or take
action relying on it. Any communications received in error, or
subsequent reply, should be deleted or destroyed.
---


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



Reply via email to