btw, what I meant by "what you're doing is very common" means ... it's common to wrap Log4j. Just don't use inheritance.
-----Original Message----- From: Lutz Michael Sent: Thursday, June 23, 2005 9:06 AM To: Log4J Users List Subject: RE: Creating our own logger read the Log4j manual that discusses how to do this properly. You'll note in the book it states to NOT extend Logger. Use the wrapper pattern (wrap through aggregation). The book discusses how. There's a PDF version available too. Mike PS What you're doing is very common. -----Original Message----- From: Fabrizio Squittieri [mailto:[EMAIL PROTECTED] Sent: Thursday, June 23, 2005 3:34 AM To: log4j-user@logging.apache.org Subject: Creating our own logger Hi there, we have an old logger, an "homemade" one and now we want to switch our logging to log4j. We have to cope with the old one for the future as all the model software written until now can't be rewritten to suite the old log. Moreover we want a more powerful Logger class, as we must hold infos as userAddress userName and so on. In this scenario i thought to extend log4j and create my own Logger class, in this way i can use all the log4j features and specialize behaviour as we want. I would like to have a common interface as i can see this new Logger by this interface in my new model software where it arrives after been created by a servlet (which will be responsible of setting extra infos) whilst for the old software can be seen as the old logger. So it would be Logging interface (which?) Old logger ^ ^ | | My new Logger But the point is that i can't see any interface implemented by log4j as i hoped... In fact i tuought it would have been a Logging interface implemented by log4j and java.util.working... That's not truth unfortunately. What do you suggest? Thanks Fabrizio Squittieri - Programmatore Sistema informativo - Comune di Prato Via Cairoli 16 - Prato 0574615275 [EMAIL PROTECTED] [EMAIL PROTECTED] ---------------------------------------------------------------------------- --- This message and any included attachments are from Siemens Medical Solutions USA, Inc. and are intended only for the addressee(s). The information contained herein may include trade secrets or privileged or otherwise confidential information. Unauthorized review, forwarding, printing, copying, distributing, or using such information is strictly prohibited and may be unlawful. If you received this message in error, or have reason to believe you are not authorized to receive it, please promptly delete this message and notify the sender by e-mail with a copy to [EMAIL PROTECTED] Thank you --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] ------------------------------------------------------------------------------- This message and any included attachments are from Siemens Medical Solutions USA, Inc. and are intended only for the addressee(s). The information contained herein may include trade secrets or privileged or otherwise confidential information. Unauthorized review, forwarding, printing, copying, distributing, or using such information is strictly prohibited and may be unlawful. If you received this message in error, or have reason to believe you are not authorized to receive it, please promptly delete this message and notify the sender by e-mail with a copy to [EMAIL PROTECTED] Thank you --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]