logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Bender Heri" <HBen...@Ergonomics.ch>
Subject AW: Redirect system.out into FileAppende
Date Thu, 08 Jan 2009 13:24:36 GMT
I suggest to implement a specialized OutputStream which writes to the file appender (or directly
to the file appender's file, if no threading issue arise). Then replace the default System.out
and System.err streams by this specialized stream.

-----Ursprüngliche Nachricht-----
Von: Thomas.TH.Hamacher@partner.bmw.ch [mailto:Thomas.TH.Hamacher@partner.bmw.ch] 
Gesendet: Donnerstag, 8. Januar 2009 14:06
An: log4j-user@logging.apache.org
Betreff: [SPAM (Bayesain Analysis)] - Redirect system.out into FileAppender - Bayesian Filter
detected spam


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?


To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org

View raw message