I’ve been doing, or at least trying, to do all of the logging within the controllers. But where should logging really occur, especially if the logging involves both server-side and client-side logging end points?
Note: this isn’t homework.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Logging should occur where you are doing what you are trying to log. If you are running a query, add logging in your DAO class.
Have a look at Logging in Java and in general: Best Practices? for some best practices.