> I can see your viewpoint, but I think that it is sometimes necessary.
> What if my component logs to 25 categories but I give you an easy way to
> cascade it by calling the main setLevel().

Such complex component MUST have some configuration mechanism for the 
logger.

The logger may have too. With Log4J there is a XML configuration file
and with Avalon's LogKit there is a similar mechanism that is still
hiding in another part of the API.


But I also wrote:
> >    Notice that I believe in being able to set the level in some
> >    common configuration mechanism, just not on the interface.

Which means that there should be a (maybe optional) logging mechanism
that helps you configure that kind of thing. But after that, you just
use a Logger with no setLevel().


Anyway, if by the People demand the setLevel() must exist, then I 
still think it should always work, whatever was the original level.
Otherwise it even looks broken!


Have fun,
Paulo Gaspar


> -----Original Message-----
> From: Scott Sanders [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 09, 2002 8:23 PM
> 
> 
> I can see your viewpoint, but I think that it is sometimes necessary.
> What if my component logs to 25 categories but I give you an easy way to
> cascade it by calling the main setLevel().
> 
> Scott
> 
> > -----Original Message-----
> > From: Paulo Gaspar [mailto:[EMAIL PROTECTED]] 
> > Sent: Wednesday, January 09, 2002 11:39 AM
> > 
> > 
> > I personally think you should avoid changing the log level 
> > after the configuration step.
> > 
> > However, I also agree that if you call setLevel() is because 
> > you really want to change the level and are supposed to know 
> > what you are doing.
> > 
> > The 2 alternatives that make more sense to me:
> >  - A setLevel() that always changes the level;
> > 
> >  - No setLevel() at all.
> >    The (Avalon) wrappers I use work this way and I never miss that
> >    thing. I am not sure if it is such a common need that it should
> >    have a place in this common interface.
> > 
> >    Notice that I believe in being able to set the level in some
> >    common configuration mechanism, just not on the interface.
> > 
> > 
> > Have fun,
> > Paulo Gaspar
> > 
> > 
> > > -----Original Message-----
> > > From: Scott Sanders [mailto:[EMAIL PROTECTED]]
> > > Sent: Wednesday, January 09, 2002 7:28 PM
> > >
> > >
> > > I think that all calls should push through to the 
> > underlying system, 
> > > and that if possible the set/getLevel methods should operate on the 
> > > underlying implementation.
> > >
> > > Scott
> > > ...


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

Reply via email to