Where registration should go in the bow architecture with DDD

I am developing a console application using bow architecture and domain-driven design. I have two domains where I need to implement logging, I was confused where I can place the registration component. Can I place this in the appropriate infrastructure of two domains? Or In a common kernel that can be referenced in both domains? If I need to place it in a common core, what is the structure that I have to follow? I mean, as the core, infrastructure.

+9
source share
3 answers

Logging is a cross-cutting issue. aspect-oriented programming aims to encapsulate cross-cutting issues into aspects. This allows for clean isolation and code reuse, addressing the cross-cutting issue.

You need to create a library and implement your logging classes, for example, "MyProject.CrossCutting.Logging". And use aspect-oriented approaches to recording events using this library.

Typical Onion Architecture

+5
source

. . , , .Net Framework, Spring .. , , , .

+3

DDD , , . Logger. , , , , , , . , , . , Logging - .

+1
source

Source: https://habr.com/ru/post/1569020/


All Articles