Question

In a web application that respects a 3-tier architecture, who is responsible for the implementation of a user logging module: the presentation tier or the application one?

I'm asking that question because a user logging module isn't really part of the logic tier of an application, but neither of the presentation one.

Was it helpful?

Solution

Logging is cross-cutting concern, so doesn't belong in any one tier. I advise you to avoid creating a logging module if at all possible. It is unlikely to add any value and will just duplicate existing logging frameworks. Just use something like SLF4J consistently.

OTHER TIPS

Logging exceptions help identify and eliminate flaws in programming logic. The best judge of what is an application flaw should be the actual method itself. The view tier should just display information; it shouldn't be charged with figuring out what is and what isn't a programming logic flaw. Thus, would be the logic tier (model/controller, in mvc parlance).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top