If I read the commons-logging articles correctly, this is exactly how commons-
logging came to be. A wrapper grown dynamic.

Tom



Quoting Lutz Michael <[EMAIL PROTECTED]>:

> 
> 
> One additional quick thought: someone mentioned using Commons Logging to
> switch back and forth between JDK logging, Log4j, and potentially other
> logging solutions.
> 
> If one wraps Log4j as recommended by Ceki's book using Decorator (GoF), one
> realizes a similar effect.  The wrapper class could even load a particular
> logging solution at run-time based on system configuration.
> 
> I get the impression that in general Ceki recommends wrapping Log4j.  Note
> that he strongly recommends against sub-classing Logger, which is often a
> developer's first direction.  Decorator is recommended, although I don't
> think an interface for Logger exists as such so one must emulate the Log4j
> interface if so desired.  An organization could also of course choose more
> of an Adapter approach, and make the interface whatever they prefer,
> potentially shooting for backward compatibility with a logging solution
> already in existence in the enterprise.
> 
> This approach mitigates the risk of being tied to a particular solution,
> while not incurring the potential pains of Commons Logging.
> 
> Mike
> 
> 
> -----Original Message-----
> From: Tbee [mailto:[EMAIL PROTECTED]
> Sent: Monday, October 27, 2003 3:59 AM
> To: Log4J Users List
> Subject: RE: Log4J vs. java.util.logging
> 
> 
> > Admittedly, many of us at here at log4j-user@ are biased in favor of
> log4j.
> 
> Really? Naaaaaah.
> 
> ---------------------------------------------------------------------
> 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]
> 
> 



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

Reply via email to