log4net SDK Reference

XmlConfigurator.ConfigureAndWatch Method (ILoggerRepository, FileInfo)

Configures the ILoggerRepository using the file specified, monitors the file for changes and reloads the configuration if a change is detected.

[Visual Basic]
Overloads Public Shared Sub ConfigureAndWatch( _
   ByVal repository As ILoggerRepository, _
   ByVal configFile As FileInfo _
)
[C#]
public static void ConfigureAndWatch(
   ILoggerRepository repository,
   FileInfo configFile
);

Parameters

repository
The repository to configure.
configFile
The XML file to load the configuration from.

Remarks

The configuration file must be valid XML. It must contain at least one element called log4net that holds the configuration data.

The configuration file will be monitored using a FileSystemWatcher and depends on the behavior of that class.

For more information on how to configure log4net using a separate configuration file, see Configure.

See Also

XmlConfigurator Class | log4net.Config Namespace | XmlConfigurator.ConfigureAndWatch Overload List | Configure