Hi,
I see no problem in some aspect like logging. Logging or tracing doe's not
depend on some framework or Container. If my "bean" or "service" is not
hosted by some container I
don't need any specific for "contract" interfaces or methods.
It is the same nonsence as implement
"setContext( ejbContext )" for Servlet or some ActiveX specific method for
plain Automation Object.
"public void setLogger( Log log )" has no meaning, if nobody sets this
"Log".
----- Original Message -----
From: Michael A. Smith <[EMAIL PROTECTED]>
To: Jakarta Commons Developers List <[EMAIL PROTECTED]>
Sent: Wednesday, April 03, 2002 9:50 PM
Subject: Re: [logging] Need interface...
> I'm trying to stay out of this debate, but I just can't let this go by:
>
> On Wed, 3 Apr 2002 [EMAIL PROTECTED] 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:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>