On Apr 25, 2007, at 1:10 AM, Paul Smith wrote:
I'd like to propose that in 1.2.15 we allow the Configurator
classes to recognize support for the juli-log4j bridge.
For example:
log4j.xml:
<log4j:configuration debug="false" threshold="debug"
assimilateJUL="true">
...
log4j.properties:
log4j.assimilateJUL=true
If set, the Configurator classes check if the juli-bridge classes
are available, and invoke the appropriate method on the
JuliLog4jBridge class. If classes are not present, then an ERROR
level LogLog can be output.
Should be easy to do? This would enable component writers to use
JUL logging directly rather than use JCL or other frameworks, and
let the integrator use the bridge.
Paul
Probably not good for log4j 1.2.x itself to have any special
knowledge of a companion. If configurator needs to know details like
the class name of the bridge, then the whole thing should go into
log4j 1.2.x itself.
Any chance that you could stretch and somehow express this thing as
an object type that DOMConfigurator already knows about? For
example, could this be a "special" type of Renderer, Appender, or
Logger where you could do something like:
<renderer class="org.apache.log4j.julibridge.BridgeRenderer"/>
to instantiate the bridge without any new log4j side code.
On a slightly related note, I've been thinking about setting up a
sandbox project for the org.apache.log4j.rolling appenders. One of
the technical challenges is how to support the nested rolling policy
and triggering policy elements. What I've been thinking is to define
a new interface (perhaps DOMConfiguratorListener) in both log4j
1.2.15 and the RFA sandbox project. After setting the params and
before the call to activateOptions, the recently created appender
would be checked if it implemented the new interface and if so, it
would be called with the current element from the configurator. The
enhancement would have definitely been designed for the
o.a.l.r.RFA's, but it would not have any specific knowledge of them
and could be used by other classes.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]