Finding Errant Output to System.out in Large Java Program
Posted
by SvrGuy
on Stack Overflow
See other posts from Stack Overflow
or by SvrGuy
Published on 2010-04-20T21:54:54Z
Indexed on
2010/04/20
22:03 UTC
Read the original article
Hit count: 285
Hi,
We have a large java code base [~1 M Lines].
Buried (somewhere) in the code base is some old debug output to System.out that we want to remove (its cluttering things up).
The problem is: out code base is so large that we can't easily find where the output is coming from. What we want is a way to see where System.out.println is getting called from (like a stack trace from an exception or some such).
Its not suitable to debugging -- the errant output is coming from some errant thread somewhere etc.
Any ideas on how to track the source of this errant output down?
PS: 99.99% of calls to System.out are legit, and we have thousands of them, so simply searching the code base for System.out calls is not a solution!
© Stack Overflow or respective owner