gpt4 book ai didi

c# - 具有洋葱架构的 Asp.Net Core 中的 NLog

转载 作者:行者123 更新时间:2023-11-30 16:41:20 24 4
gpt4 key购买 nike

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

非常感谢。

最佳答案

This is my solution

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

repo 中的项目 NLogNet 实现了 standard solution

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

关于c# - 具有洋葱架构的 Asp.Net Core 中的 NLog,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49387953/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com