tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan Luehe <Jan.Lu...@Sun.COM>
Subject Re: cvs commit: jakarta-tomcat-catalina/catalina/src/share/org/apache/catalina/realm DataSourceRealm.java JAASCallbackHandler.java JAASMemoryLoginModule.java JDBCRealm.java JNDIRealm.java RealmBase.java UserDatabaseRealm.java
Date Fri, 18 Feb 2005 23:18:09 GMT


Remy Maucherat wrote:
> Jan Luehe wrote:
> 
>>Remy Maucherat wrote:
>>
>>
>>>luehe@apache.org wrote:
>>>
>>>
>>>
>>>>luehe       2005/02/18 11:17:57
>>>>
>>>>Modified:    catalina/src/share/org/apache/catalina/realm
>>>>                      DataSourceRealm.java JAASCallbackHandler.java
>>>>                      JAASMemoryLoginModule.java JDBCRealm.java
>>>>                      JNDIRealm.java RealmBase.java
>>>>                      UserDatabaseRealm.java
>>>>Log:
>>>>More logging cleanup
>>>
>>>
>>>I disagree with these changes: all these logs are application specific, 
>>>which is why I direct them to the application category.
>>>
>>>Can you explain why it is bad ?
>>
>>
>>I think the boundaries between container and application specific logs
>>has been pretty blurred, and we've been using the two inconsistently in
>>the past.
>>
>>In my interpretation, any log messages issued by ServletContext.log()
>>should be directed to container.getLogger(), but any container
>>generated log messages should be directed to LogFactory.getLog().
>>
>>Where do you see the line? This has been something that has confused
>>me in the past.
> 
> 
> The thing has been blurred in 5.0. In 4.1, loggers were associated with 
> containers (ex: a context). All logging for the container (including all 
> subcomponents such as realm, manager, etc) would go to it. I liked that 
> better.
> 
> I reintroduced that in 5.5 by adding a per container category (with 
> nesting).

I'm still confused. ;-)
Which log messages are supposed to go to LogFactory.getLog(), and which
ones to Container.getLogger()?
For example, in StandardContext.java, we're using LogFactory.getLog()
exclusively. Shouldn't most of them also be considered app specific
and therefore be directed to Container.getLogger()?

I understand the difference between the 2 "Log" types is that one
carries the app name and the container nesting levels in its name,
whereas the other carries the fully qualified class name of the
container class that issued the log message.

Therefore, while the former allows log messages to be differentiated
by app name in the server log, the latter allows to pinpoint the
container component that printed the log message. I think a combination
of the two would be most useful.

I also think it would make sense to be able to distinguish the log
messages issued by ServletContext.log() from those log messages
that originate from the container.

I'll undo my 2 previous commits until I have a better understanding
of the issue.

Thanks,


Jan


---------------------------------------------------------------------
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