How to use NLog from several projects in one solution

I searched the web for a really simple question. My solution is one exe project (WPF) and four class libraries . I need a magazine and I like NLog. How can I use it from all 5 projects in one solution?

I don't know, do I need to create (or get somewhere) a wrapper class project that references all projects and use Nlog? I saw something like this for log4Net.

Or is there some kind of pattern or best practice for this scenario?

+6
source share
1 answer

Just specify NLOG directly in each of the projects and use it. But you only need to configure it in your main application. Then the configuration will be automatically transferred.

+9
source

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


All Articles