Header and footer coming two times more in log4net logs

末鹿安然 提交于 2019-12-05 18:39:48

You don't need

 XmlConfigurator.Configure();

if you have

[assembly: XmlConfigurator(Watch = true)]

Having both will result in the two headers and two footers.

As to why you have three sets, perhaps you are calling XmlConfigurator.Configure() twice.

Putting XmlConfigurator.Configure() at more than one places may result in having more >than one header and footer pair.

XmlConfigurator.Configure() should be defined only at one place in the solution. Better >approach is to put it in AssemblyInfo.cs.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!