• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Paul Clapham
  • Devaka Cooray
  • Ron McLeod
  • paul wheaton
Saloon Keepers:
  • Tim Moores
  • Piet Souris
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Al Hobbs
  • Frits Walraven
  • Scott Selikoff

Logging in the Application

Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.

Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
Slideshow boring ... losing consciousness ... just gonna take a quick nap on this tiny ad ...
the value of filler advertising in 2021
    Bookmark Topic Watch Topic
  • New Topic