Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 4fccfe23f6486142b4197d1daac0cf21 > files > 100

Falcon-doc-0.9.6.6-2.fc15.noarch.rpm

<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   <title>Class LogArea - Class LogArea</title>
   <link href="faldoc.css" rel="stylesheet" type="text/css"/>
   <link href="tabs.css" rel="stylesheet" type="text/css"/>
</head>
<body class="faldoc_body">
<div class="navitop">
   <div class="tabs">
      <ul>
         <li><a href="./index.html"><span>Main</span></a></li>
         <li><a href="./modules.html"><span>Modules</span></a></li>
         <li><a href="./pages.html"><span>Related pages</span></a></li>
         <li><a href="./groups.html"><span>Groups</span></a></li>
         <li><a href="./classes.html"><span>Classes</span></a></li>
         <li><a href="./objects.html"><span>Objects</span></a></li>
         <li><a href="./functions.html"><span>All functions</span></a></li>
         <li><a href="./enum.html"><span>Enumerations</span></a></li>
         
      </ul>
   </div>
</div>
<hr/>

<h1 class="faldoc_title">Class LogArea<span class="faldoc_belong"><a href="./module_feather_logging.html">[in Logging support]</a></p></h1>

<p class="faldoc_brief">Collection of log channels. </p>
<p class="faldoc_funcdecl">
<b>class</b> LogArea( name )
</p>


   
   <h2 class="faldoc_title">Summary</h2>
   <table class="faldoc_list">
   
      
         <tr><td><a href="#add">add()</a></td><td>Adds a channel to this log area. </td></tr>
      
         <tr><td><a href="#log">log()</a></td><td>Sends a log entry to all the registred channels. </td></tr>
      
         <tr><td><a href="#minlog">minlog()</a></td><td>Determines what is the minimum log severity active on this area. </td></tr>
      
         <tr><td><a href="#remove">remove()</a></td><td>Removes a channel from this log area. </td></tr>
      
   
   </table>









   <h2 class="faldoc_title">Methods</h2>
   
      <h3 class="faldoc_funcname"><a name="add">add()</a></h3>
      <p class="item_brief">Adds a channel to this log area. </p>
      <p class="faldoc_funcdecl">LogArea.add( channel )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">channel</td><td class="faldoc_paramdesc">The channel to be added. </td></tr>
         
         
         
         </table>
      
      
   
      <h3 class="faldoc_funcname"><a name="log">log()</a></h3>
      <p class="item_brief">Sends a log entry to all the registred channels. </p>
      <p class="faldoc_funcdecl">LogArea.log( level, message, [code] )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">level</td><td class="faldoc_paramdesc">The level of the log entry. </td></tr><tr><td class="faldoc_param">message</td><td class="faldoc_paramdesc">The message to be logged. </td></tr>
         <tr><td class="faldoc_optparam">code</td><td class="faldoc_optparamdesc">A numeric code representing an application specific message ID. </td></tr>
         
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text"> The <b>level</b> parameter can be an integer number, or one of the following conventional constants representing levels: </p>
<ul>
<li><b>LOGF</b>: failure; the application met a total failure condition and is going to halt. </li><li><b>LOGE</b>: error; the application met an error condition, possibly dangerous enough to cause future termination or malfunction, but not dangerous enough to justify immediate exit. </li><li><b>LOGW</b>: warning; the application met an unusual condition that that should be noted and known by other applications, developers or users checking for possible problems. </li><li><b>LOGI</b>: infromation; the application wants to indicate that a normal or expected event actually happened. </li><li><b>LOGD</b>: debug; A message useful to track debugging and development information. </li><li><b>LOGD1</b>: lower debug; debug used for very low level, and specialized debugging. </li><li><b>LOGD2</b>: still lower debug. </li>
</ul>
</p>
   
      <h3 class="faldoc_funcname"><a name="minlog">minlog()</a></h3>
      <p class="item_brief">Determines what is the minimum log severity active on this area. </p>
      <p class="faldoc_funcdecl">LogArea.minlog( )</p>
      
         <table class="faldoc_function">
         
         
         <tr><td class="faldoc_funcreturn">Returns:</td><td class="faldoc_funcreturndesc">A number representing a log severity, or -1 </td></tr>
         
         </table>
      
      <p class="faldoc_text"><p class="faldoc_text">This function returns the log level accepted by the registered channel that is logging the least severe level. </p>
<p class="faldoc_text">Notice that severity and numerical values of the logging levels are in inverse order. So, the highest severity, which is "fatal", has an absolute value of 0, the "error" level has a value of 1 and so on. </p>
<p class="faldoc_text">So, to check for the log level you wish to use to be actually streamed by some of the registered channel, you have to: </p>
<pre class="faldoc_code">
  if level &lt;= GeneralLog.minlog()
     // ok, someone will log my entry
     GeneralLog.log( level, "entry" )
  end
</pre>
</p>
   
      <h3 class="faldoc_funcname"><a name="remove">remove()</a></h3>
      <p class="item_brief">Removes a channel from this log area. </p>
      <p class="faldoc_funcdecl">LogArea.remove( channel )</p>
      
         <table class="faldoc_function">
         <tr><td class="faldoc_param">channel</td><td class="faldoc_paramdesc">The channel to be removed. </td></tr>
         
         
         
         </table>
      
      
   

<hr/>
<div class="navibottom">
   <center>
      <a href="./index.html">Main</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./modules.html">Modules</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./pages.html">Related pages</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./groups.html">Groups</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./classes.html">Classes</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./objects.html">Objects</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./functions.html">All functions</a>&nbsp;&nbsp;-&nbsp;&nbsp;<a href="./enum.html">Enumerations</a>
   </center>
</div>
</div>
<div class="faldoc_signature">Made with <a href="http://www.falconpl.org">faldoc 2.2.0</div>
</body>
</html>