log4net.Config.XmlConfigurator()的目的是什么

时间:2011-10-31 13:32:46

标签: log4net

我看到有人在AssemblyInfo.cs中放了log4net.Config.XmlConfigurator()。它到底是做什么的?

1 个答案:

答案 0 :(得分:1)

取自:http://logging.apache.org/log4net/release/manual/configuration.html

// Configure log4net using the .config file
[assembly: log4net.Config.XmlConfigurator(Watch=true)]
// This will cause log4net to look for a configuration file
// called TestApp.exe.config in the application base
// directory (i.e. the directory containing TestApp.exe)
// The config file will be watched for changes.