Search code examples
c#log4netapp-configlog4net-configurationlog4net-appender

How can i define Log4Net configuration in a custom xml file?


I'm using Log4Net in my application in C#. How can i define my Log4Net Configuration in a custom xml file (not the appconfig file) ? How can i tell my xmlconfigurator to use that specific xml file ?


Solution

  • I think you mean this one: log4net.Config.XmlConfigurator(ConfigFile = "MyStandardLog4Net.config", Watch = true)]

    ref: http://www.codeproject.com/Articles/140911/log-net-Tutorial