logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Surya Poola <suryapo...@yahoo.com>
Subject Re: cannot write to a file with rollingfileappender in log4j1.3
Date Tue, 16 Jan 2007 16:36:08 GMT
Dirk,
    I have multiple instance of webapp applications .So currently i tried by saving my log4j.xml
file in WEB-INF/classes folder.
  The file is been picked up, but i am getting the same warnings that i got earlier without
any file output( Ihave switched on the debug . mode)
  log4j:WARN Continuable parsing error 3 and column 29
log4j:WARN Document root element "configuration", must match DOCTYPE root "null".
log4j:WARN Continuable parsing error 3 and column 29
log4j:WARN Document is invalid: no grammar found.
log4j:WARN The <configuration> element has been deprecated.
log4j:WARN Use the <log4j:configuration> element instead.
log4j: Threshold ="".
log4j: Level value for root is  [info].
log4j: root level set to INFO
log4j: Class name: [org.apache.log4j.rolling.RollingFileAppender]
log4j: Setting property [append] to [true].
log4j: Parsing layout of class: "org.apache.log4j.PatternLayout"
log4j: Setting property [conversionPattern] to [%d{yyyy-MM-dd HH:mm:ss},%p,%c,%t %m%n].
   
  My log4j.xml file looks like:
  <?xml version="1.0" encoding="UTF-8"?>
  <configuration debug="true">
  <appender class="org.apache.log4j.rolling.RollingFileAppender" name="MyFileAppender">
  <param name="Append" value="true"/>
  <rollingPolicy class="org.apache.log4j.rolling.TimeBasedRollingPolicy">
  <param name="FileNamePattern" value="/pkg/vdqxx/home//jakarta-tomcat-4.1.30/logs/a.log.%d{yyyy-MM)"/>
  </rollingPolicy>
  <layout class="org.apache.log4j.PatternLayout">
  <param name="ConversionPattern" value="%d{yyyy-MM-dd HH:mm:ss},%p,%c,%t %m%n"/>
  </layout>
  </appender>
  <root>
  <level value="info"/>
  <appender-ref ref="MyFileAppender"/>
  </root>
  </configuration>
  
and i just given the following stements in my code:
  logger=Logger.getLogger (Classname.class);
  logger.info("Perormance log Classname");
   
  is the default configurator DOM or Joran .as per the output it looks like DOM.
  Can you help me in fixing this issue.
   
  Thanks in advance.
  Regards
  Rohan
  
Dirk Ooms <dirk@onesparrow.com> wrote:
  Rohan,
do you have multiple instances of tomcat or multiple webapps within tomcat? anyway, typically
one puts the log4j.xml in the WEB-INF/classes of each webapp. it will then be picked up by
JoranConfigurator (without doing anything explicit in your code, except for a getLogger()).
Do not use the in version 1.3, JoranConfigurator does not accept it.

dirk

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



 
---------------------------------
No need to miss a message. Get email on-the-go 
with Yahoo! Mail for Mobile. Get started.
 
---------------------------------
Any questions?  Get answers on any topic at Yahoo! Answers. Try it now.
Mime
  • Unnamed multipart/alternative (inline, 8-Bit, 0 bytes)
View raw message