tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ceki Gülcü <c...@qos.ch>
Subject Re: JMX and config of log4j in container env.
Date Sat, 15 Jun 2002 16:24:08 GMT
At 14:42 14.06.2002 -0700, costinm@covalent.net wrote:

>I recently enabled JMX support for jk, and one of the things it's
>doing is detect if log4j is available and enable the log4j JMX.
>
>There are few problems - and this is a deeper problem, that affects
>the use of log4j as 'main' logger for tomcat.
>
>The first problem is conflicts in the generated names for the
>log4j mbeans. For example, if 2 apps define a 'stdout' appender, both
>will get the same name and things brake.

Yes. That's a known problem. One solution is to separate log4j mbeans by 
hierarchy. That might require hierarchies to be named entities, which is 
not the case at the moment.

>There is a second problem - it seems curently only the root category
>is visible - if now log categories are defined they are not visible.
>( it is possible to use add() and make them visible, but add() is
>broken and doesn't allow to define new logging categories ).

Hmm. That's possible but nonetheless surprising.

>It is obviously cool to be able to change the logging level on
>the root category, but that's too coarse - so more granularity is
>needed.

Obviously.

>The real big problem is in keeping the apps insolated, when log4j
>is in the main classpath. It seems there are still problems with
>that.

Yes.

>Another big issue is finding a way to 'hook' the Context.log()
>into log4j.

I dare say that that's a Tomcat problem.

>I think the best solution for most of those problems would be to
>allow somehow to use the webapp name ( VHOST:/path ) as a prefix
>or namespace for the logging categories and appenders ( and the
>associated JMX names ). We also need a mechansim to merge the
>global log4j config with local log4j properties specified per
>webapp.
>
>( and a way to override and control from the central config
>what the webapps are allowed to do - remember the webapp
>is not allways trusted )
>
>Opinions? Sugestions ?

Let's keep this channel open. I'd like to tackle the logging insulation 
problem first.

>Costin

--
Ceki

SUICIDE BOMBING - A CRIME AGAINST HUMANITY
Sign the petition: http://www.petitiononline.com/1234567b
I am signatory number 22106. What is your number?


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


Mime
View raw message