user1329572
user1329572

Reputation: 6406

Where should logging occur in an MVC framework?

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.

Upvotes: 0

Views: 134

Answers (1)

stevedbrown
stevedbrown

Reputation: 8934

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.

Upvotes: 1

Related Questions