Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where does a logger goes in DDD?

To which layer does the logger belongs in DDD?

like image 914
ryudice Avatar asked Jan 18 '11 21:01

ryudice


Video Answer


1 Answers

What would we want to log in DDD?

Important events that occur, of course.

The Logger itself is a service of the infrastructure. Bridging the domain and the logger can occur in an event handler.

Logging fits well inside of event handlers and when placed there it creates a very nice separation of concerns.

like image 101
quentin-starin Avatar answered Sep 21 '22 07:09

quentin-starin