blob: cfac2f99d1f95b56a18833542f33394da4e37587 [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>ILog Interface</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">ILog Interface</h1>
</div>
</div>
<div id="nstext">
<p> The ILog interface is use by application to log messages into the log4net framework. </p>
<p>For a list of all members of this type, see <a href="log4net.ILogMembers.html">ILog Members</a>.</p>
<p>
</p>
<div class="syntax">
<span class="lang">[Visual�Basic]</span>
<br />Public�Interface�ILog<div>����Implements�<a href="log4net.Core.ILoggerWrapper.html">ILoggerWrapper</a></div></div>
<div class="syntax">
<span class="lang">[C#]</span>
<div>public�interface�ILog<b> : <a href="log4net.Core.ILoggerWrapper.html">ILoggerWrapper</a></b></div>
</div>
<h4 class="dtH4">Types that implement ILog</h4>
<div class="tablediv">
<table class="dtTABLE" cellspacing="0">
<tr valign="top">
<th width="50%">Type</th>
<th width="50%">Description</th>
</tr>
<tr valign="top">
<td width="50%">
<a href="log4net.Core.LogImpl.html">LogImpl</a>
</td>
<td width="50%"> Implementation of <a href="log4net.ILog.html">ILog</a> wrapper interface. </td>
</tr>
</table>
</div>
<h4 class="dtH4">Remarks</h4>
<p> Use the <a href="log4net.LogManager.html">LogManager</a> to obtain logger instances that implement this interface. The <a href="log4net.LogManager.GetLogger_overload_6.html">GetLogger</a> static method is used to get logger instances. </p>
<p> This class contains methods for logging at different levels and also has properties for determining if those logging levels are enabled in the current configuration. </p>
<p> This interface can be implemented in different ways. This documentation specifies reasonable behavior that a caller can expect from the actual implementation, however different implementations reserve the right to do things differently. </p>
<h4 class="dtH4">Example</h4><p>Simple example of logging messages <pre class="code"><span class="lang">[C#]
</span>ILog log = LogManager.GetLogger("application-log");
log.Info("Application Start");
log.Debug("This is a debug message");
if (log.IsDebugEnabled)
{
log.Debug("This is another debug message");
}
</pre>
</p><h4 class="dtH4">Requirements</h4><p><b>Namespace: </b><a href="log4net.html">log4net</a></p><p><b>Assembly: </b>log4net (in log4net.dll)
</p><h4 class="dtH4">See Also</h4><p><a href="log4net.ILogMembers.html">ILog Members</a> | <a href="log4net.html">log4net Namespace</a> | <a href="log4net.LogManager.html">LogManager</a> | <a href="log4net.LogManager.GetLogger_overload_6.html">GetLogger</a></p><object type="application/x-oleobject" classid="clsid:1e2a7bd0-dab9-11d0-b93a-00c04fc99f9e" viewastext="true" style="display: none;"><param name="Keyword" value="ILog interface, about ILog interface"></param></object><hr /><div id="footer"><a href='http://logging.apache.org/log4net/'>Copyright 2004-2011 The Apache Software Foundation.</a><br></br>Apache log4net, Apache and log4net are trademarks of The Apache Software Foundation.</div></div>
</body>
</html>