Hi! To log only my classes activity on the console at DEBUG level I put in the conf/log4j.xml:
<appender name="MYLOG" class="org.apache.log4j.ConsoleAppender"> <param name="Target" value="System.out"/> <param name="Threshold" value="DEBUG"/> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/> </layout> </appender> and <category name="it.mycompany" additivity="false"> <appender-ref ref="MYLOG"/> </category> Finally in the classes that I need to log: final static Logger log = Logger.getLogger(myclass.class); So i can log "it.mycompany" package and its sub-package... I hope this can help you... Gio > -----Messaggio originale----- > Da: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] conto di Scott M > Stark > Inviato: martedi 10 febbraio 2004 16.18 > A: [EMAIL PROTECTED] > Oggetto: RE: [JBoss-user] log4j DEBUG > > > That is the correct way to enable debug for a category. You have to > remove any INFO threshold > on the category in order for these messages to show up. > > > xxxxxxxxxxxxxxxxxxxxxxxx > Scott Stark > Chief Technology Officer > JBoss Group, LLC > xxxxxxxxxxxxxxxxxxxxxxxx > > > > ________________________________ > > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Eric J > Kaplan > Sent: Tuesday, February 10, 2004 6:50 AM > To: [EMAIL PROTECTED] > Subject: RE: [JBoss-user] log4j DEBUG > > > > Any ideas? I've trolled the forums with no answers. I can turn on DEBUG > for everything on the CONSOLE appender (and I see the debug messages for > the bean below), but how do I do for a single class. We use the > log4j.properties file for our client and it works like a charm. I > figured the xml configuration would be similar, and I'm surprised what I > have below doesn't work. It's hard for us to support our users without > being able to individually turn on logging. I'm sure I'm doing something > silly. > > > ------------------------------------------------------- The SF.Net email is sponsored by EclipseCon 2004 Premiere Conference on Open Tools Development and Integration See the breadth of Eclipse activity. February 3-5 in Anaheim, CA. http://www.eclipsecon.org/osdn _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user