log4net SDK Reference |

# 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 Sub ConfigureAndWatch( _
ByVal configFile As FileInfo _
)
[C#]
public static void ConfigureAndWatch(
FileInfo configFile
);

#### 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