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.
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.
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.