You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by Remy Maucherat <re...@apache.org> on 2005/02/20 00:04:40 UTC
Re: Logging
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