You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@avalon.apache.org by "Peter M. Goldstein" <pe...@yahoo.com> on 2002/08/07 18:59:48 UTC

Logger question

All,

I've got a quick question about the contract implied by the Logger
interface.  As I read the Logger javadoc, there is no guarantee provided
by the Logger interface that the log levels supported by a logger are
constant over time.  That is, in theory it would be possible to have a
logger that logged at an info level from 9a-9p and a debug level from
9p-9a.  Is this interpretation correct?

This affects use of the Avalon framework because, if the above
interpretation is correct, caching whether a logger supported a
particular log level would be a bad idea.  This issue came up in recent
James discussions and I was just hoping someone on the Avalon list could
quickly clarify.  Thanks.

--Peter




--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: Logger question

Posted by "Peter M. Goldstein" <pe...@yahoo.com>.
Peter,

Thanks for the reply.

> > I've got a quick question about the contract implied by the Logger
> > interface.  As I read the Logger javadoc, there is no guarantee
provided
> > by the Logger interface that the log levels supported by a logger
are
> > constant over time.  That is, in theory it would be possible to have
a
> > logger that logged at an info level from 9a-9p and a debug level
from
> > 9p-9a.  Is this interpretation correct?
> 
> Mostly.

How is this not correct?  Some detail would be greatly appreciated.
 
> > This affects use of the Avalon framework because, if the above
> > interpretation is correct, caching whether a logger supported a
> > particular log level would be a bad idea.  This issue came up in
recent
> > James discussions and I was just hoping someone on the Avalon list
could
> > quickly clarify.  Thanks.
> 
> In the case of James, phoenix currenty does not change dynamically at
this
> stage. However you should not need to cache it as checking if a
particular
> log level is a fast operation.

Right, but the goal is not to just be phoenix-compatible, but rather to
be Avalon framework-compatible.  I don't want James to have dependencies
on undeclared and non-guaranteed behaviors of the container.  This is
especially important now as we're doing some neatening to reduce our
code-level dependency on any one container (specifically Phoenix).

Thanks again.

--Peter 



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


Re: Logger question

Posted by Peter Donald <pe...@apache.org>.
On Thu, 8 Aug 2002 02:59, Peter M. Goldstein wrote:
> All,
>
> I've got a quick question about the contract implied by the Logger
> interface.  As I read the Logger javadoc, there is no guarantee provided
> by the Logger interface that the log levels supported by a logger are
> constant over time.  That is, in theory it would be possible to have a
> logger that logged at an info level from 9a-9p and a debug level from
> 9p-9a.  Is this interpretation correct?

Mostly.

> This affects use of the Avalon framework because, if the above
> interpretation is correct, caching whether a logger supported a
> particular log level would be a bad idea.  This issue came up in recent
> James discussions and I was just hoping someone on the Avalon list could
> quickly clarify.  Thanks.

In the case of James, phoenix currenty does not change dynamically at this 
stage. However you should not need to cache it as checking if a particular 
log level is a fast operation.

-- 
Cheers,

Peter Donald
--------------------------------------------------
"An intellectual is someone who has been educated 
beyond their intelligence."
-------------------------------------------------- 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>