Index: Core\DefaultRepositorySelector.cs =================================================================== --- Core\DefaultRepositorySelector.cs (working copy) 2010-07-08 00:26:00.000000000 +-0300 +++ (working copy) (revision ????) 2010-07-08 16:56:42.000000000 +-0300 @@ -20,13 +20,12 @@ // and uses the CompactRepositorySelector instead #if !NETCF using System; using System.Collections; using System.Configuration; -using System.IO; using System.Reflection; using log4net.Config; using log4net.Util; using log4net.Repository; @@ -681,14 +680,8 @@ { // Try to configure the default repository using an AppSettings specified config file // Do this even if the repository has been configured (or claims to be), this allows overriding // of the default config files etc, if that is required. // Determine whether to watch the file or not based on an app setting value: - bool watchRepositoryConfigFile = false; - Boolean.TryParse(SystemInfo.GetAppSetting("log4net.Config.Watch"), out watchRepositoryConfigFile); // Determine the file name based on an app setting value: string repositoryConfigFile = SystemInfo.GetAppSetting("log4net.Config"); if (repositoryConfigFile != null && repositoryConfigFile.Length > 0) { @@ -699,37 +692,12 @@ } catch(Exception ex) { LogLog.Warn("DefaultRepositorySelector: Exception getting ApplicationBaseDirectory. appSettings log4net.Config path ["+repositoryConfigFile+"] will be treated as an absolute URI", ex); } - if (watchRepositoryConfigFile) - { // As we are going to watch the config file it is required to resolve it as a // physical file system path pass that in a FileInfo object to the Configurator - string repositoryConfigFilePath = applicationBaseDirectory + @"\" + repositoryConfigFile; - FileInfo repositoryConfigFileInfo = null; - try - { - repositoryConfigFileInfo = new FileInfo(repositoryConfigFilePath); - } - catch (Exception ex) - { - LogLog.Error("DefaultRepositorySelector: Exception while parsing log4net.Config file physical path [" + repositoryConfigFilePath + "]", ex); - } - try - { - XmlConfigurator.ConfigureAndWatch(repositoryConfigFileInfo); - } - catch (Exception ex) - { - LogLog.Error("DefaultRepositorySelector: Exception calling XmlConfigurator.ConfigureAndWatch method with ConfigFilePath [" + repositoryConfigFilePath + "]", ex); - } - } - else - { // As we are not going to watch the config file it is easiest to just resolve it as a // URI and pass that to the Configurator Uri repositoryConfigUri = null; try { if (applicationBaseDirectory != null) @@ -756,13 +724,12 @@ // TODO: Support other types of configurator XmlConfigurator.Configure(repository, repositoryConfigUri); } catch (Exception ex) { LogLog.Error("DefaultRepositorySelector: Exception calling XmlConfigurator.Configure method with ConfigUri [" + repositoryConfigUri + "]", ex); - } } } } } }