logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clare.My...@Anthem.com
Subject Re: AW: error during DOMConfigurator::configure(String filename) call
Date Wed, 08 Oct 2003 15:00:21 GMT

That was it.  Thank you.

Thanks!
Clare H. Myers
Application Developer Advisor
Anthem - AMMS
(513) 336-5472


                                                                                         
                                                 
                      "Bansemir, Carsten"                                                
                                                 
                      <Carsten.Bansemir@huk        To:       "Log4J Users List" <log4j-user@jakarta.apache.org>
                           
                      -coburg.de>                  cc:                                
                                                    
                                                   Subject:  AW: error during DOMConfigurator::configure(String
filename) call             
                      10/08/2003 10:48 AM                                                
                                                 
                      Please respond to                                                  
                                                 
                      "Log4J Users List"                                                 
                                                 
                                                                                         
                                                 
                                                                                         
                                                 




I'm not really sure but isn't the order of the elements in the .XML file
important?
I think the <param> arguments should stand before the <layout> part, so
your log4j config file should look somethink like:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration debug="false">
      <appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
            <appender-ref ref="ROLLFILE"/>
      </appender>

      <appender name="ROLLFILE"
class="org.apache.log4j.DailyRollingFileAppender">
            <param name="DatePattern" value="'.'yyyyMMdd"/>
            <param name="File"
value="/amms/development/data/hipaatest.log"/>
            <layout class="org.apache.log4j.PatternLayout">
                  <param name="ConversionPattern" value="[%t] %d{yyyyMMdd
HH:mm:ss:SSS} %-5p %c - %m%n"/>
            </layout>
      </appender>

      <root>
            <priority value="debug"/>
            <appender-ref ref="ASYNC"/>
      </root>
</log4j:configuration>

but this is only an idea, don't know if this is really the point.

-----Urspr√ľngliche Nachricht-----
Von: Clare.Myers@Anthem.com [mailto:Clare.Myers@Anthem.com]
Gesendet: Mittwoch, 8. Oktober 2003 16:30
An: log4j-user@jakarta.apache.org
Betreff: error during DOMConfigurator::configure(String filename) call


I am trying to use the DailyRollingFileAppender in an asynchronous way.
When executing the DOMConfigurator::configure(String filename) I am getting
the following error:

      log4j:ERROR Parsing error on line 15 and column 12
      log4j:ERROR The content of element type "appender" must match
"(errorHandler?,param*,layout?,filter*,appender-ref*)".

Here is my config file:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration debug="false">
      <appender name="ASYNC" class="org.apache.log4j.AsyncAppender">
            <appender-ref ref="ROLLFILE"/>
      </appender>

      <appender name="ROLLFILE"
class="org.apache.log4j.DailyRollingFileAppender">
            <layout class="org.apache.log4j.PatternLayout">
                  <param name="ConversionPattern" value="[%t] %d{yyyyMMdd
HH:mm:ss:SSS} %-5p %c - %m%n"/>
            </layout>

            <param name="DatePattern" value="'.'yyyyMMdd"/>
            <param name="File"
value="/amms/development/data/hipaatest.log"/>
      </appender>

      <root>
            <priority value="debug"/>
            <appender-ref ref="ASYNC"/>
      </root>
</log4j:configuration>

Any ideas?

Thanks!
Clare H. Myers
Application Developer Advisor
Anthem - AMMS
(513) 336-5472




CONFIDENTIALITY NOTICE: This e-mail message, including any attachments,
is for the sole use of the intended recipient(s) and may contain
confidential
and privileged information or otherwise protected by law.  Any unauthorized
review, use, disclosure or distribution is prohibited.  If you are not the
intended recipient, please contact the sender by reply e-mail and destroy
all copies of the original message.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org








CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, 
is for the sole use of the intended recipient(s) and may contain confidential
and privileged information or otherwise protected by law.  Any unauthorized
review, use, disclosure or distribution is prohibited.  If you are not the
intended recipient, please contact the sender by reply e-mail and destroy
all copies of the original message.

---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org


Mime
View raw message