Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Logging and Debugging

 
Steve Granton
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
I was wondering whether anyone has used any logging framework for the application - such as the JLF or Log4J? Are we allowed to use such third party libraries in our code? Or are we limited to the API provided by J2SE?
Would it be acceptable for me to create helper class to facilitate debugging which can be 'compiled out' rather than using the System.out.println() which would need to be removed manually?
Thanks,
Steve
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can use any means you see fit to debug your code. I wouldn't leave any of that code int he final submission, but it definitely will help you out in coding and designing, rather than using printlns. I know i had so many printlns and it is always a pain to remove them, and to try to debug like that is a nightmare.
Mark
 
Steve Granton
Ranch Hand
Posts: 200
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Mark,
I'm using Ant for build and deployment and was hoping to use its 'replace' task to 'toggle' between a release and debug build. However, as you say, the code should probably not be left in the final release so I'll need to think of a better method.
Thanks,
Steve
 
Reshma Das
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why can i use any debugging tool in the appl. iam using my own helper classes to print the debug stmts to the console. in fact iam printing the entire stack trace too on colsole.
i dont want to remove those stmt when i submit it but i will disable the print stmt by setting debug to false in the properties file.
in fact iam planning to use a drop down in the client entry screen for the user to select debugging or not.
in server we have to pass from command prompt true or false.
how does it sound?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic