【发布时间】:2016-08-11 10:42:36
【问题描述】:
我在我的 C# 应用程序中使用 Log4Net。如何在自定义 xml 文件(不是 appconfig 文件)中定义我的 Log4Net 配置? 我如何告诉我的 xmlconfigurator 使用那个特定的 xml 文件?
【问题讨论】:
-
喜欢这个?
log4net.Config.XmlConfigurator.Configure(new FileInfo("filename")); -
谢谢,正是我想要的:[程序集:XmlConfigurator(ConfigFile = "../../Configuration.xml", Watch = true)]
标签: c# log4net app-config log4net-configuration log4net-appender