hi, I have an application which is deployed in a Jetty server. The application is working properly. The problem is, we did not log the debug statements during development. now we have around 400 java files in which there are hundreds of println statements and i need to log them in a log file using java.util.logging. The only solution as i understand is to define a handler for each and every java file and convert the debug(println) statements into logging statements, which is any way time consuming.
could any one suggest a better way of doing this. I mean is there any tool which we can plug-in to the Jetty server which can log all the debug statements into a log file.
It will be really helpful for me, if anyone suggests a better way to handle this problem.
posted 9 years ago
I am not familiar with the plug-in.
One hack that you could try is to Reassigns the "standard" output stream. Check System.setOut(PrintStream out) to re-direct the output to a log file.
However, I would still suggest to change the code (e.g., System.out.println()) to use logging API.