Hi Jim,

I have seen and tried your code from contrib but I could not get it
running. Here I attach the method I call but the application gets blocks
for a long time and then I get an exception

In the e-mail I read the discussion about such issues, but I did not
understand the discussion.


    public static void setErrOut()
        throws IOException
    {
        PrintStream prt = new PrintStream(
                new LoggingOutputStream(
                    Category.getRoot(),
                        Priority.INFO), true);
 
        System.setOut(prt);
        System.setErr(prt);
    }

Jim Moore wrote:
> 
> See the contribs/JimMoore directory in CVS.
> 
> http://jakarta.apache.org/cvsweb/index.cgi/jakarta-log4j/contribs/JimMoore/
> 
> Please note that this should only be used to get messages sent to STDOUT and
> STDERR in code that you have no control over.  The best mehod for code you
> control, by far, is to use the normal Log4j methods.
> 
> -Jim Moore
> 
> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]On Behalf Of Zsolt Koppany
> Sent: Sunday, May 27, 2001 11:59 AM
> To: [EMAIL PROTECTED]
> Subject: Redirecting System.err and System.out
> 
> Hi,
> 
> is it possible to redirect System.err and System.out? I would like to
> get the stackTrace messages logged too when an exception happens.
> 
> --
> Zsolt Koppany
> Intland GmbH www.intland.com
> Schulze-Delitzsch-Strasse 16
> D-70565 Stuttgart
> Tel: +49-711-7871080 Fax: +49-711-7871017
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

-- 
Zsolt Koppany
Intland GmbH www.intland.com
Schulze-Delitzsch-Strasse 16
D-70565 Stuttgart
Tel: +49-711-7871080 Fax: +49-711-7871017

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to