какова цель log4net.Config.XmlConfigurator()

#log4net

#log4net

Вопрос:

Я видел, как кто-то поместил log4net.Config.XmlConfigurator() внутри AssemblyInfo.cs. Что именно он делает?

Ответ №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.