Apache log4net� SDK Documentation - Microsoft .NET Framework 4.0

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�Function�ConfigureAndWatch( _
���ByVal repository�As�ILoggerRepository,�_
���ByVal configFile�As�FileInfo�_
)�As�ICollection
[C#]
public�static�ICollection�ConfigureAndWatch(
���ILoggerRepositoryrepository,
���FileInfoconfigFile
);

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