Trenton D. Adams wrote:
Hi guys,
Here's a scenario. I have a web application running under tomcat5, with
multiple servlets, and various other classes. I want them all to log to
the root logger. Then I plan on using "%-35C{2}", "%-15M" and, "%-5L"
inside my log4j.properties, to print out the classname, method name, and
line number respectively. How should one go about doing this?
I was thinking I could create a static variable in each class that logs,
with a variable of type Logger. But what happens on
serialization/deserialization? Am I going to have problems with that?
Huh, serialization on a static variable? To my knowledge, that doesn't
happen anyhow. LOL Ok, forget that one. What about on an instance
variable?
Should I create a utility class that exposes a public variable of type
Logger?
I've searched the mailing list for anything to do with serialization
issues that could arise, any help would be appreciated.
Thanks.
--
Trenton D. Adams
Systems Analyst/Web Software Engineer
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]