You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Th...@partner.bmw.ch on 2009/01/08 14:05:31 UTC

Redirect system.out into FileAppender

Hi,

is it possible to redirect the normal system.out or system.err into a FileAppender defined through log4j.

I have the problem that I´m using a 3rd-party application, that uses System.out.println() in it´s code and I´d like to combine this with my other log4j-configurations into one single file currently defined through a FileAppender. Any idea how to do that?

Thanks
Thomas

Re: Redirect system.out into FileAppender

Posted by Brett Randall <ja...@gmail.com>.
Almost this exact same question was answered very recently and rather
brilliantly by Michael Erskine here:
http://www.nabble.com/I-need-to-make-logging-in-a-complete-application-td21174776.html.

Brett

On Fri, Jan 9, 2009 at 12:05 AM, <Th...@partner.bmw.ch> wrote:

> Hi,
>
> is it possible to redirect the normal system.out or system.err into a
> FileAppender defined through log4j.
>
> I have the problem that I´m using a 3rd-party application, that uses
> System.out.println() in it´s code and I´d like to combine this with my other
> log4j-configurations into one single file currently defined through a
> FileAppender. Any idea how to do that?
>
> Thanks
> Thomas
>