At 11:23 PM 11/24/2004, you wrote:


Thought I would try out Log4j-1.3 to configure Tomcat-5.5.4. I patched together
a log4j.xml file from examples I found in the testcase inputs for Log4j.
However, it seems like DOMConfigurator is being used for autoconfiguration. I
thought this had changed to JoranConfigurator. Am I just missing something or
is JoranConfigurator not being used by default for autoconfiguration?

No, definitely an omission. Corrected in CVS.

BTW, any definitive examples of config files for Joran out there?  Something
like one config file that contains examples of all appenders configured with a
good range of options?

JoranC is backward compatible with DOMC. One notable difference is that Joran can configure sub-components of log4j components. For example, if an Appender, say o.a.l.rolling.RollingFileAppender expects a rolling policy, you write:

  <appender name="ROLL" class="org.apache.log4j.rolling.RollingFileAppender">
    <rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
      <param name="fileNamePattern" value="output/test1-%d"/>
    </rollingPolicy>

    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%c{1} - %m%n"/>
    </layout>
  </appender>

Joran figures out that RollingFileAppender needs a RollingPolicy and insatiate a TimeBasedRollingPolicy.


Jake

-- Ceki G�lc�

The complete log4j manual: http://qos.ch/eclm
Professional log4j support: http://qos.ch/log4jSupport




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to