Re: [JBoss-user] logging to specific files using log4j.xml

2003-09-04 Thread Scott M Stark
You have to associate the appender with a category. Try reading the log4j manual 
to see how one uses appenders:
http://jakarta.apache.org/log4j/docs/documentation.html

Matthew Hixson wrote:

In server/default/conf/log4j.xml I have the following:

  





  
  

  

In my class I'm getting a logger and logging a test message like so:

Logger _systemLogger = Logger.getLogger("system");
_systemLogger.debug("Hey, is this thing on?");
The strange thing is that the message does not appear in 
/usr/local/jboss/server/default/log/debug.log, and in fact no such file 
ever gets created.  Instead I see:

2003-09-04 00:56:27,291 DEBUG [system] Hey, is this thing on?

in server/default/log/server.log.  That file is mentioned in two of the 
appenders that are commented out.  I don't know why my messages are 
going to that file instead of the one that I have told the appender to use.
  Another thing that would be very nice would be the ability to send 
everything that met the "system" appender's threshold to both the 
logfile and the console.  I don't want to have to change the "CONSOLE" 
appender's threshold to DEBUG because then I get a ton of messages from 
JBoss' internals and this really slows things down.
  Attached is my entire log4j.xml.
  Thanks in advance,
-M@



--

Scott Stark
Chief Technology Officer
JBoss Group, LLC



---
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
___
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user


[JBoss-user] logging to specific files using log4j.xml

2003-09-04 Thread Matthew Hixson
In server/default/conf/log4j.xml I have the following:

  





  
  

  

In my class I'm getting a logger and logging a test message like so:

Logger _systemLogger = Logger.getLogger("system");
_systemLogger.debug("Hey, is this thing on?");
The strange thing is that the message does not appear in 
/usr/local/jboss/server/default/log/debug.log, and in fact no such file 
ever gets created.  Instead I see:

2003-09-04 00:56:27,291 DEBUG [system] Hey, is this thing on?

in server/default/log/server.log.  That file is mentioned in two of the 
appenders that are commented out.  I don't know why my messages are 
going to that file instead of the one that I have told the appender to 
use.
  Another thing that would be very nice would be the ability to send 
everything that met the "system" appender's threshold to both the 
logfile and the console.  I don't want to have to change the "CONSOLE" 
appender's threshold to DEBUG because then I get a ton of messages from 
JBoss' internals and this really slows things down.
  Attached is my entire log4j.xml.
  Thanks in advance,
-M@



log4j.xml
Description: Binary data