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

Implement or not implement the logging?

 
Olena Golub
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everyone,

Another curious question is do i need to implement the logging?
Will I lose the points not to implement the logging by writing in the file?
Will I lose some points if I make all logging by writing all information to console with System.out ?

Thanks a lot for your comments!
Olena.
 
Wei-ju Wu
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hm, what would you need logging for other than diagnostic information ? I had some in there for debugging purposes, using the Java Logging API, but I found out automatic testing is the better debugging technique compared to logging.
 
Darya Akbari
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Olena,

There is nothing about logging in my assignment, so I will not provide that. In addition I'll remove all output I used for debugging.

And to the very last moment before I submit I'll check with the K&B SCJD section .

Regards,
Darya
 
Paul Bourdeaux
Ranch Hand
Posts: 783
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hm, what would you need logging for other than diagnostic information ?
Actually, logging is a very important part of any well designed application, and IMHO it should be used extensively in a real world situation to help with application maintanence.

However, this is not a real world application, and there is no requirement to use any type of logging. So if you choose not to use logging I don't think you would use points.

FYI, I used logging in my assignment. I logged all major IO operations (open file, close file) as well as all thrown exceptions. If you use the logging mechanism built into java, you will get an easy-to-read xml file with each log as well as output to the console. It only takes a few lines of code, and it makes for, in my opinion, a better application.
 
Frans Janssen
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I also provided logging. I delivered my assignment such that it was switched off by default though (logging was enabled by providing a specific property in the properties file).

I agree with Paul that logging is an important diagnostics tool and if you think you can benefit from it, you should certainly have it.

Frans.
 
Wei-ju Wu
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry, that I made my statement this short. This was not to degrade the role of logging in real-world development. For the certification assignment, however, it seems not to be necessary at all.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic