Log4net does not write the log in the log file

后端 未结 13 2529
一生所求
一生所求 2020-11-29 17:09

I have created a simple scenario using Log4net, but it seems that my log appenders do not work because the messages are not added to the log file.

I added the followi

13条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-29 17:53

    As @AndreasPaulsson suggested, we need to configure it. I am doing the configuration in AssemblyInfo file. I specify the configuration file name here.

    // Log4Net Configuration.
    [assembly: log4net.Config.XmlConfigurator(ConfigFile = "log4net.config", Watch = true)]
    

提交回复
热议问题