Redirection of existing println's
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Rami_Abramson
Posted On:   Tuesday, December 10, 2002 05:58 AM

			
Hello,

Wanting to assimilate the log4j in our application raises the question of all the existing 'println()'/'print()' uses in our code.
Is there a way in log4j to redirect println's as well as the printouts that come from the 'Logger.debug()' / 'Logger.error()' etc. , or do we have to implement that ourselves ?

thank you,

Rami

Re: Redirection of existing println's

Posted By:   Alex_Kobyakov  
Posted On:   Monday, December 16, 2002 06:07 AM

You can try code by Jim Moore, placed with Log4j as a contribution. It can be found in log4j_home/contribs/JimMoore / among with mail, regarding issues about usage of that code. I'll highly recommend that you'd read that notes before using provided approach.

And by the way, the name of logger is LoggingOutputStream.java

Hope this helps.

Re: Redirection of existing println's

Posted By:   Christopher_Koenigsberg  
Posted On:   Tuesday, December 10, 2002 06:53 AM

If you are writing to stdout (System.out) then you can redirect the output of the application, in the command shell, via the ">" redirection (both in Unix shells, and Windows command prompts).

About | Sitemap | Contact