File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Implement or not implement the logging? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Implement or not implement the logging?" Watch "Implement or not implement the logging?" New topic
Author

Implement or not implement the logging?

Olena Golub
Ranch Hand

Joined: Jan 17, 2005
Posts: 113
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.


SCJP 1.4<br />SCJD 1.4 (in progress)
Wei-ju Wu
Ranch Hand

Joined: Feb 16, 2005
Posts: 147
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.


"The UrlyBird catches the certificate. And he's gonna FlyByNight"<br /> <br />SCJP 1.2/5.0, SCJD, SCBCD, SCWCD, SCEA
Darya Akbari
Ranch Hand

Joined: Aug 21, 2004
Posts: 1855
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


SCJP, SCJD, SCWCD, SCBCD
Paul Bourdeaux
Ranch Hand

Joined: May 24, 2004
Posts: 783
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.


“Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.” - Rich Cook
Frans Janssen
Ranch Hand

Joined: Dec 29, 2004
Posts: 357
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.


SCJP 1.4, SCJD
Wei-ju Wu
Ranch Hand

Joined: Feb 16, 2005
Posts: 147
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Implement or not implement the logging?