log4j.xml
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender name="AppLogAppender" class="org.apache.log4j.DailyRollingFileAppender">
<param name="DatePattern" value="'.'yyyy-MM-dd"/>
<param name="File" value="${jboss.server.log.dir}/CATAppLogsFile.log" />
<!-- <param name="File" value="C:/Temp/CBBAppLogsFile.log" /> -->
<!-- <param name="File" value="/opt/jboss/jboss-as/standalone/log/CATAppLogsFile.log" /> -->
<layout class="org.apache.log4j.PatternLayout">
<!-- <param name="ConversionPattern" value="%d[%t] %F %l %L |%r| %C %-5p %c:[%M]%m%n" /> -->
<param name="ConversionPattern" value="%d[%t] %l %-5p %m%n" />
</layout>
</appender>
<!-- The "category" represents the package names of your Application APIs which we want to log -->
<category name="servlets">
<priority value="DEBUG"/>
</category>
<root>
<priority value ="INFO,DEBUG"/>
<appender-ref ref="AppLogAppender"/>
</root>
</log4j:configuration>
sample entry output
<param name="ConversionPattern" value="%d[%t] %F %l %L |%r| %C %-5p %c:[%M]%m%n" />
<param name="ConversionPattern" value="%d[%t] %l %-5p %m%n" />
%d 2013-05-09 16:17:29,607
[%t] [http-/0.0.0.0:8080-1]
%F CATFilter.java
%l com.dd.dd.dd.dd.CATBFilter.doFilter(CATFilter.java:219)
%L 219
%r |1253856|
%C com.dd.dd.dd.dd.CATFilter
%-5p INFO
%c:[%M]%m%n com.dd.dd.dd.dd.CATFilter:[doFilter]*****Exiting*****
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
<appender name="AppLogAppender" class="org.apache.log4j.DailyRollingFileAppender">
<param name="DatePattern" value="'.'yyyy-MM-dd"/>
<param name="File" value="${jboss.server.log.dir}/CATAppLogsFile.log" />
<!-- <param name="File" value="C:/Temp/CBBAppLogsFile.log" /> -->
<!-- <param name="File" value="/opt/jboss/jboss-as/standalone/log/CATAppLogsFile.log" /> -->
<layout class="org.apache.log4j.PatternLayout">
<!-- <param name="ConversionPattern" value="%d[%t] %F %l %L |%r| %C %-5p %c:[%M]%m%n" /> -->
<param name="ConversionPattern" value="%d[%t] %l %-5p %m%n" />
</layout>
</appender>
<!-- The "category" represents the package names of your Application APIs which we want to log -->
<category name="servlets">
<priority value="DEBUG"/>
</category>
<root>
<priority value ="INFO,DEBUG"/>
<appender-ref ref="AppLogAppender"/>
</root>
</log4j:configuration>
sample entry output
<param name="ConversionPattern" value="%d[%t] %F %l %L |%r| %C %-5p %c:[%M]%m%n" />
<param name="ConversionPattern" value="%d[%t] %l %-5p %m%n" />
%d 2013-05-09 16:17:29,607
[%t] [http-/0.0.0.0:8080-1]
%F CATFilter.java
%l com.dd.dd.dd.dd.CATBFilter.doFilter(CATFilter.java:219)
%L 219
%r |1253856|
%C com.dd.dd.dd.dd.CATFilter
%-5p INFO
%c:[%M]%m%n com.dd.dd.dd.dd.CATFilter:[doFilter]*****Exiting*****
No comments:
Post a Comment