NLog in Asp.Net Core with Onion Architecture

NLog in Asp.Net Core with Onion Architecture

在 Onion Architecture 上下文中,我将如何在 Asp.Net Core 中实现 NLog?我想我必须创建一个单独的项目,其范围是将 NLog 包装和映射到本机 .dotnet Core Logger (Microsoft.Extensions.Logging.ILogger),然后将此依赖项添加到 Web 项目,以防其他项目(服务、其他基础设施...),对吗?

非常感谢。

This is my solution

asp.net 核心项目没有对 NLog 的引用。

repo 中的项目 NLogNet 实现了 standard solution

所有其他项目都使用基于洋葱架构的结构实施解决方案