commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael A. Smith" <...@apache.org>
Subject Re: [logging] Need interface...
Date Wed, 03 Apr 2002 19:50:07 GMT
I'm trying to stay out of this debate, but I just can't let this go by:

On Wed, 3 Apr 2002 costinm@covalent.net wrote:
> I'm thinking as:
> 
>  class MyClass implements LogUser { 
>     // default logger 
>     private static Logger logger = Log.getLogger(MyClass.class);
>  
>     public void setLogger( Log log ) {

         // should really fail-fast if a null logger is provided rather
         // than have logging statements fail at some unknown point in 
         // the future. 
         if(log == null) throw new NullPointerException("null log");

>        logger=log;
>     }
> 
>     ...
>       if( logger.isDebugEnabled() ) logger.debug("Something" );
>  }


yeah, I know it was just pseudo-code.  :)

regards,
michael


--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message