True enough, but what about when you want to turn off a certain logger? If you turn off the STDOUT/STDERR logger _all_ events to it will be shut off.
One of the great powers of log4j is in the logger naming hierarchy and using (java) package based logger names. This allows you to turn on/off output from specific classes/packages. However, if I have logger 'STDOUT' for System.out and 'STDERR' for System.err then when I turn off those loggers I will not see any their output from anywhere. For me anyway this is not the desirable effect. Besides, as I await the outcry from my fellow developers for turning off the STDOUT and STDERR my response is thus: logger.debug System.out.println using log4j is 35% more efficient! change the logger name to log and it is almost twice as efficient!! -----Original Message----- From: Jonathan Cowherd [mailto:[EMAIL PROTECTED]] Sent: Friday, January 03, 2003 8:52 AM To: 'Log4J Users List' Subject: RE: STDOUT & STDERR in jboss For the most part, but I usually rely on the message content to determine where the call is coming from. It would be nice if I could do something at runtime so that old applications wouldn't need to be changed... I know, how lazy can I be. :) I'll post the question to the jboss users list and maybe someone can point me to where they've done it. Thanks. Jonathan Paul Cowherd Linux and Java Administrator Genscape, Inc. Email: [EMAIL PROTECTED] Office: (502) 583-3730 Mobile: (502) 314-0444 -----Original Message----- From: Klein, Scott @ TW [mailto:[EMAIL PROTECTED]] Sent: Friday, January 03, 2003 11:35 AM To: 'Log4J Users List' Subject: RE: STDOUT & STDERR in jboss This would be a nice addition, I am sure there are some issues though. I recently added code to send System.out and System.err to a NullOutputStream in order to "encourage" use of log4j. I thought about doing something similar to this but the problem you run into is that System.out/err will go to a separate logger than the one obtained by the class (and all of these calls will go to the same logger). So you lose the advantage of knowing where the System.out/err calls are coming from. hope that makes sense.... -----Original Message----- From: Jonathan Cowherd [mailto:[EMAIL PROTECTED]] Sent: Friday, January 03, 2003 8:26 AM To: '[EMAIL PROTECTED]' Subject: STDOUT & STDERR in jboss JBOSS redirects all System.err and System.out to log4j some how. Is this something the JBOSS group did or is it something that is a part of log4j? [2003-01-03 10:35:51,740,root] Installed System.out adapter [2003-01-03 10:35:51,742,root] Installed System.err adapter Jonathan Paul Cowherd Linux and Java Administrator Genscape, Inc. Email: [EMAIL PROTECTED] Office: (502) 583-3730 Mobile: (502) 314-0444 -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]> -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>