【发布时间】:2019-01-04 14:13:02
【问题描述】:
我需要在新的 Asp.net Core 应用上使用 log4net。运行项目时出现 FileNotFoundException 错误。
Startup.cs
ConfigureServices 方法:
services.AddLogging(builder =>
{
builder.AddConfiguration(Configuration.GetSection("Logging"))
.AddConsole()
.AddDebug();
});
配置方法:
loggerFactory.AddLog4Net("log4net.config");
我在这一行得到错误。 Log4net.config 文件在 UI 项目中。
为什么会出现这个错误?
【问题讨论】:
标签: c# asp.net-core .net-core log4net log4net-configuration