[jboss-user] [Tomcat, HTTPD, Servlets & JSP] - Re: Web application logging

jaikiran do-not-reply at jboss.com
Fri May 9 06:15:50 EDT 2008


In the simplest form you can edit the jboss-log4j.xml and add the following:

  | <appender name="MYSERVLET_LOG" class="org.jboss.logging.appender.RollingFileAppender">
  |         <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"/>
  |         <param name="File" value="${jboss.server.log.dir}/myservlet.log"/>
  |         <param name="Append" value="false"/>
  |         <param name="MaxFileSize" value="500KB"/>
  |         <param name="MaxBackupIndex" value="1"/>
  |    
  |         <layout class="org.apache.log4j.PatternLayout">
  |           <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/>
  |         </layout>	    
  |    </appender>
  | 
  | <category name="org.apache.catalina.core.ContainerBase.[jboss.web].[localhost].[/ws/v06]">
  |       <priority value="DEBUG"/>
  |       <appender-ref ref="MYSERVLET_LOG"/>
  |       
  |    </category>
  | 

If the context of the web app changes, then you will have to appropriately change the jboss-log4j.xml category too.


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

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



More information about the jboss-user mailing list