1. If I want to deliver my assignment with logging, is it recommandable to output the logging in a file or is it enough to log it with the console?
2. Should I avoid to log within private methods?
The Sun Certified Java Developer Exam with J2SE 5: paper version from Amazon, PDF from Apress, Online reference: Books 24x7 Personal blog
You should log anywhere that you might want to see what has been happening. So if you want to see what was happening in a private method then put logging in there.
(These are all things you would have to consider in a real life application, and they can all be handled fairly easily, but they are overkill for this assignment - save yourself the bother and put default logging to console for this assignment).
So I would probably just set standard logging to console, set the logging level high enough that nothing gets logged, then have a menu option which will bring up a dialog where the user can choose where to store their log file and what level to log.
Originally posted by Ulrich Heeger:
Hi Max,
thank you.
Ulrich
Np, but you knew the answer to that one without having to ask me.
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |