• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Too many comments vs too much logging

 
Min Huang
Ranch Hand
Posts: 100
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I find myself to be a very paranoid programmer and tend to put log statements everywhere to help me out. Given that the assignment says not to overuse comments where they wouldn't help clarify the code, how does extensive use of the logging framework compare to that? Is it a bad thing to have too much logging?
 
Jacques Bosch
Ranch Hand
Posts: 319
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Min.
Too much is quite relative.
I think lot's of logging is fine. Just use the different log levels correctly, and make it configurable in the startup GUI so that the operator can choose there whether they want logging or not and how much.
And, do something like the below to prevent unneeded overheads:

Enjoy.
J
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic