• 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 ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Implement or not implement the logging?

 
Ranch Hand
Posts: 113
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 147
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 1855
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 783
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic