|
From: Sal I. <sal...@sy...> - 2003-08-28 07:43:20
|
if at initialization the wrapper does this:
PrintStream mySystemOut = System.out;
then it can still log to the original System.out by doing this:
mySystemOut.println () instead of System.out.println ()
this way the wrapper doesn't need to sacrifice its own logging statements.
meanwhile, everybody else that uses System.out ends up going through log4j
because log4j probably did System.out = new Log4JPrintStream ();
BTW: don't know if relevant, but this is from
jboss/server/application-name/conf/jboss-service.xml, at least as of jboss
3.2.1:
<!--
==================================================================== -->
<!-- Log4j
-->
<!--
==================================================================== -->
<mbean code="org.jboss.logging.Log4jService"
name="jboss.system:type=Log4jService,service=Logging">
<attribute name="ConfigurationURL">resource:log4j.xml</attribute>
<!-- Set the org.apache.log4j.helpers.LogLog.setQuiteMode. As of
log4j1.2.8
this needs to be set to avoid a possible deadlock on exception at the
appender level. See bug#696819.
-->
<attribute name="Log4jQuiteMode">true</attribute>
</mbean>
-----Original Message-----
From: wra...@li...
[mailto:wra...@li...]On Behalf Of Leif
Mortenson
Sent: Thursday, August 28, 2003 12:22 AM
To: wra...@li...
Subject: Re: [Wrapper-user] requestThreadDump and log4j
Thomas,
This makes good sense. I applied your patch as is. It will be in
the next release.
Cheers,
Leif
Thomas Hart wrote:
>Hi,
>
>we use wrapper with jboss on some Windows 2000 Adv. Cluster. And we
>use our own log4j appender. In some situation we have a deadlock in
>log4j (in conjunction with our own appender). If we have the lock
>every thread that work with Logger, Catergory, System.out or
>System.in hangs (System.out and Systen.in because the jboss people
>redirect the output from System. to log4j). So at that time we need a
>full thread dump. Normally this works perfect, but if log4j hangs
>the class WrapperManager hangs too, if you call the method
>WrapperManager#requestThreadDump.
>
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Wrapper-user mailing list
Wra...@li...
https://lists.sourceforge.net/lists/listinfo/wrapper-user
|