Apache log4net� SDK Documentation - Microsoft .NET Framework 4.0

XmlConfigurator.ConfigureAndWatch�Method�(FileInfo)

Configures log4net 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 configFile�As�FileInfo�_
)�As�ICollection
[C#]
public�static�ICollection�ConfigureAndWatch(
���FileInfoconfigFile
);

Parameters

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