tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remy Maucherat <r...@apache.org>
Subject Re: Logging
Date Sat, 19 Feb 2005 23:04:40 GMT
Bill Barker wrote:
>> Jan Luehe wrote:
>>
>>> Remy,
>>>
>>> Remy Maucherat wrote:
>>>
>>>> Jan Luehe wrote:
>>>>
>>>> It's a little risky. We should use the container logger only while 
>>>> the classloader is initialized.
>>>>
>>>> It's probably far from perfect ;)
>>>
>>> Then how about RealmBase.authenticate()?
>>>
>>> RealmBase.authenticate(String username, String credentials)
>>> uses Container.getLogger(), whereas the other RealmBase.authenticate()
>>> methods use LogFactory.getLog(). Shouldn't this be consistent?
>>> This is where my confusion has stemmed from.
>>
>> Well, yes, it's a problem. It's simple: as soon as the container is 
>> started, all the container logging should go to container.getLogger(), 
>> as it used to in Tomcat 4.x.
>>
>> That was my idea.
> 
> Another option is to use something like:
>  log = LogFactory.getLog(container.logName()+".RealmBase");
> 
> The output will usually go to the container log, but it allows you to 
> only set the Realm to log as debug.

That seems like a good idea.

Rémy

---------------------------------------------------------------------
To unsubscribe, e-mail: tomcat-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tomcat-dev-help@jakarta.apache.org


Mime
View raw message