Apache log4net� SDK Documentation - Microsoft .NET Framework 4.0

DOMConfigurator.ConfigureAndWatch�Method�(ILoggerRepository, FileInfo)

NOTE: This method is now obsolete.

Use XmlConfigurator.ConfigureAndWatch instead of DOMConfigurator.ConfigureAndWatch


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(
���ILoggerRepositoryrepository,
���FileInfoconfigFile
);

Parameters

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

Remarks

DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator.

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

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