File Watcher is not working

Topics: Logging Application Block
May 29, 2007 at 8:27 AM
I am using Enterprise Library 3.0 on windows 2000 sp4 .net framework 2.0. I change logging configuration section of configuration file (appName.exe.config) at runtime i.e. Priority Filter's minimum value to 8 from 1 but the running instance of application does not reflect this change. Also I added following code in beginning

IConfigurationSource source = new SystemConfigurationSource();
source.AddSectionChangeHandler("loggingconfiguration", ChangeHappened);

but does not fired.

Is there any configuration settings need to be added in app configuration file regarding file watcher or it is enabled by default.

Zeeshan Gulzar
Aug 31, 2007 at 1:08 AM
I have the same issue. i am going through the source as now one else seems to have the issue? using entlib3.1 xpsp2
Sep 3, 2007 at 3:24 PM

This short repro program seems to be working (EntLib 3.1, XPSP2). Can you provide more details about your problems? Kind of app, etc.

class Program
static void Main(string[] args)
SystemConfigurationSource source = new SystemConfigurationSource();

source.AddSectionChangeHandler(InstrumentationConfigurationSection.SectionName, Changed);

Console.WriteLine("Press enter to stop");

static void Changed(object sender, ConfigurationChangedEventArgs e)
Console.WriteLine(string.Format("Changed! section '{0}'", e.SectionName));