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 Lasse Ahvenainen <la...@yahoo.se> on 2003/01/09 15:56:41 UTC
Sample of xml.file with logging levels for separate packages.
Hi !
I'm trying to set up my xml-file so that I can have
different levels of logging on different
java-packages, I ve tried to set it up, but it does
not work.
So if anyone has a working sample of this, I'd be very
happy.
Thanks
_____________________________________________________
Gratis e-mail resten av livet på www.yahoo.se/mail
Busenkelt!
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>
RE: Sample of xml.file with logging levels for separate packages.
Posted by Chris Yoerg <ch...@yoerg.net>.
I have an appender defined in JBoss that does what you want.
They two key parts of it are shown below, which can be repeated for your
various packages. These parts are within the attached log4j.xml file.
The appender/category shown will log for any class, servlet, ejb etc
that is within the net.yoerg..... package
<!-- Custom logging for patent prior art database changes-->
<appender name="PRIORART"
class="org.jboss.logging.appender.DailyRollingFileAppender">
<param name="File"
value="${jboss.server.home.dir}/log/priorart.log"/>
<param name="Append" value="true"/>
<param name="Threshold" value="INFO"/>
<param name="DatePattern" value="'.'yyyy-MM"/>
<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>
Hope this helps.
Chris Yoerg
-----Original Message-----
From: Lasse Ahvenainen [mailto:lasse_ahv@yahoo.se]
Sent: Thursday, January 09, 2003 7:57 AM
To: log4j-user@jakarta.apache.org
Subject: Sample of xml.file with logging levels for separate packages.
Hi !
I'm trying to set up my xml-file so that I can have
different levels of logging on different
java-packages, I ve tried to set it up, but it does
not work.
So if anyone has a working sample of this, I'd be very
happy.
Thanks
_____________________________________________________
Gratis e-mail resten av livet på www.yahoo.se/mail
Busenkelt!
--
To unsubscribe, e-mail:
<ma...@jakarta.apache.org>
For additional commands, e-mail:
<ma...@jakarta.apache.org>