blob: 83a913a2110699e62bbc592fc3490487acd3d1da [file] [log] [blame]
<html dir="LTR">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252" />
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />
<title>DOMConfigurator.ConfigureAndWatch Method (FileInfo)</title>
<xml>
</xml>
<link rel="stylesheet" type="text/css" href="MSDN.css" />
</head>
<body id="bodyID" class="dtBODY">
<div id="nsbanner">
<div id="bannerrow1">
<table class="bannerparthead" cellspacing="0">
<tr id="hdr">
<td class="runninghead">Apache log4net� SDK Documentation - Microsoft .NET Framework 4.0</td>
<td class="product">
</td>
</tr>
</table>
</div>
<div id="TitleRow">
<h1 class="dtH1">DOMConfigurator.ConfigureAndWatch�Method�(FileInfo)</h1>
</div>
</div>
<div id="nstext">
<P>
<FONT color="red">
<B>NOTE: This method is now obsolete.</B>
</FONT>
</P>
<P>
<B>Use XmlConfigurator.ConfigureAndWatch instead of DOMConfigurator.ConfigureAndWatch</B>
</P>
<HR />
<p> Configures log4net using the file specified, monitors the file for changes and reloads the configuration if a change is detected. </p>
<div class="syntax">
<span class="lang">[Visual�Basic]</span>
<br />Overloads�Public�Shared�Sub�ConfigureAndWatch( _<br />���ByVal <i>configFile</i>�As�<a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemIOFileInfoClassTopic.htm">FileInfo</a>�_<br />)</div>
<div class="syntax">
<span class="lang">[C#]</span>
<br />public�static�<a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemVoidClassTopic.htm">void</a>�ConfigureAndWatch(<br />���<a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemIOFileInfoClassTopic.htm">FileInfo</a><i>configFile</i><br />);</div>
<h4 class="dtH4">Parameters</h4>
<dl>
<dt>
<i>configFile</i>
</dt>
<dd>The XML file to load the configuration from.</dd>
</dl>
<h4 class="dtH4">Remarks</h4>
<p>
<b>DOMConfigurator is obsolete. Use XmlConfigurator instead of DOMConfigurator.</b>
</p>
<p> The configuration file must be valid XML. It must contain at least one element called <code>log4net</code> that holds the configuration data. </p>
<p> The configuration file will be monitored using a <a href="ms-help://MS.NETFrameworkSDKv1.1/cpref/html/frlrfSystemIOFileSystemWatcherClassTopic.htm">FileSystemWatcher</a> and depends on the behavior of that class. </p>
<p> For more information on how to configure log4net using a separate configuration file, see <b>Configure</b>. </p>
<h4 class="dtH4">See Also</h4><p><a href="log4net.Config.DOMConfigurator.html">DOMConfigurator Class</a> | <a href="log4net.Config.html">log4net.Config Namespace</a> | <a href="log4net.Config.DOMConfigurator.ConfigureAndWatch_overloads.html">DOMConfigurator.ConfigureAndWatch Overload List</a> | <b>Configure</b></p><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e" viewastext="true" style="display: none;"><param name="Keyword" value="ConfigureAndWatch method"></param><param name="Keyword" value="ConfigureAndWatch method, DOMConfigurator class"></param><param name="Keyword" value="DOMConfigurator.ConfigureAndWatch method"></param></object><hr /><div id="footer"><a href='http://logging.apache.org/log4net/'>Copyright 2004-2013 The Apache Software Foundation.</a><br></br>Apache log4net, Apache and log4net are trademarks of The Apache Software Foundation.</div></div>
</body>
</html>