You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Chris Yoerg <ch...@yoerg.net> on 2002/12/12 17:15:13 UTC
Need help with JBoss log files
I'm creating a custom log file within JBoss using a log4j.xml config
file. I've successfully made the custom logger track actions of users
within the application in question, utilizing the following
configuration information(I'm getting the proper info).
I want the appender to create a new file every day, rather than
overwrite the same file, creating a history record of all changes made
to the database, which must be kept forever (it's for a law firm you
know).
The behavior I want is similar to the localhost_access(date).log files
that tomcat creates. I would appreciate it if somebody could tell me
what modifications I need to make to the log4j.xml file to do this
properly.
I have looked in the archives, and the JBoss documentation doesn't tell
me what to do.
Thank you.
Chris Yoerg
These are the modifications to log4j.xml file that I have made so far.
<!-- Custom logging for patent prior art database changes-->
<appender name="PRIORART"
class="org.jboss.logging.appender.RollingFileAppender">
<param name="File"
value="${jboss.server.home.dir}/log/priorart.log"/>
<param name="Append" value="false"/>
<param name="Threshold" value="INFO"/>
<param name="MaxFileSize" value="500KB"/>
<param name="MaxBackupIndex" value="10"/>
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="%d{MMM dd,yyyy HH:mm:ss}
%-5p [%c{1}] %m%n"/>
</layout>
</appender>
<!-- Custom categories for patent prior art database changes-->
<category name="net.yoerg">
<priority value="INFO" />
<appender-ref ref="PRIORART"/>
</category>