I read the Wiki page on logging 
(http://www.jboss.org/wiki/Wiki.jsp?page=Logging) and wanted to use the 
TCLFilter but could not get it to work. I used the sample log4j.xml config 
entries and the log file would be created but nothing was written to it. For 
the DeployURL I was using the name of my war file, which is not packaged in an 
ear.  I tried various things, but the only thing that worked was removing the 
".war" part of the file name for the DeployURL parameter. Once I did that, 
logging from my application was written to the file I specified.

My question is, is the Wiki wrong, is the DeployURL supposed to be different 
for war's versus ear's, or am I just doing something wrong?

My log4j.xml config snippet:

  |    <appender name="MyApp1" 
class="org.jboss.logging.appender.DailyRollingFileAppender">
  |       <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
  |       <param name="File" value="${jboss.server.home.dir}/log/MyApp1.xml"/>
  |       <param name="Append" value="false"/>
  | 
  |       <!-- Rollover at midnight each day -->
  |       <param name="DatePattern" value="'.'yyyy-MM-dd"/>
  | 
  |       <layout class="org.apache.log4j.xml.XMLLayout"/>
  |       <filter class="org.jboss.logging.filter.TCLFilter">
  |          <param name="AcceptOnMatch" value="true"/>
  |          <!-- The war file is actually named "MyApp1.war". -->
  |          <param name="DeployURL" value="MyApp1"/>
  |       </filter>
  |     </appender>
  | 
  |    <root>
  |       <appender-ref ref="CONSOLE"/>
  |       <appender-ref ref="FILE"/>
  |       <appender-ref ref="MyApp1"/>
  |    </root>
  | 
  | 

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3874950#3874950

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3874950


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to