Separating application logs on jboss 4.0.5

2019-07-27 14:18发布

问题:

How can I upgrade JBoss AS 4.0.5 to TCL Filter, so that it supports separate application logs.

Any help is appreciated in advance.

Thanks, Ram

回答1:

Googled for "jboss tclfilter", first hit:

http://community.jboss.org/wiki/SeparatingApplicationLogs

<appender name="App1Log" class="org.apache.log4j.FileAppender">
  <errorHandler class="org.jboss.logging.util.OnlyOnceErrorHandler"></errorHandler>
  <param name="Append" value="false"/>
  <param name="File" value="${jboss.server.home.dir}/log/app1.log"/>
  <layout class="org.apache.log4j.PatternLayout">
     <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/>
  </layout>
  <filter class="org.jboss.logging.filter.TCLFilter">
     <param name="AcceptOnMatch" value="true"/>
     <param name="DeployURL" value="app1.ear"/>
  </filter>
</appender>


标签: java jboss log4j