doc/api/python/ant.AntHandler-class.html
changeset 436 9dcc6e7393f7
parent 432 f2ddfa555b0f
equal deleted inserted replaced
435:9374c207cfee 436:9dcc6e7393f7
       
     1 <?xml version="1.0" encoding="ascii"?>
       
     2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
       
     3           "DTD/xhtml1-transitional.dtd">
       
     4 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
       
     5 <head>
       
     6   <title>ant.AntHandler</title>
       
     7   <link rel="stylesheet" href="epydoc.css" type="text/css" />
       
     8   <script type="text/javascript" src="epydoc.js"></script>
       
     9 </head>
       
    10 
       
    11 <body bgcolor="white" text="black" link="blue" vlink="#204080"
       
    12       alink="#204080">
       
    13 <!-- ==================== NAVIGATION BAR ==================== -->
       
    14 <table class="navbar" border="0" width="100%" cellpadding="0"
       
    15        bgcolor="#a0c0ff" cellspacing="0">
       
    16   <tr valign="middle">
       
    17 
       
    18   <!-- Tree link -->
       
    19       <th>&nbsp;&nbsp;&nbsp;<a
       
    20         href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
       
    21 
       
    22   <!-- Index link -->
       
    23       <th>&nbsp;&nbsp;&nbsp;<a
       
    24         href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
       
    25 
       
    26   <!-- Help link -->
       
    27       <th>&nbsp;&nbsp;&nbsp;<a
       
    28         href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
       
    29 
       
    30       <th class="navbar" width="100%"></th>
       
    31   </tr>
       
    32 </table>
       
    33 <table width="100%" cellpadding="0" cellspacing="0">
       
    34   <tr valign="top">
       
    35     <td width="100%">
       
    36       <span class="breadcrumbs">
       
    37         <a href="ant-module.html">Module&nbsp;ant</a> ::
       
    38         Class&nbsp;AntHandler
       
    39       </span>
       
    40     </td>
       
    41     <td>
       
    42       <table cellpadding="0" cellspacing="0">
       
    43         <!-- hide/show private -->
       
    44         <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
       
    45     onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
       
    46         <tr><td align="right"><span class="options"
       
    47             >[<a href="frames.html" target="_top">frames</a
       
    48             >]&nbsp;|&nbsp;<a href="ant.AntHandler-class.html"
       
    49             target="_top">no&nbsp;frames</a>]</span></td></tr>
       
    50       </table>
       
    51     </td>
       
    52   </tr>
       
    53 </table>
       
    54 <!-- ==================== CLASS DESCRIPTION ==================== -->
       
    55 <h1 class="epydoc">Class AntHandler</h1><span class="codelink"><a href="ant-pysrc.html#AntHandler">source&nbsp;code</a></span><br /><br />
       
    56 <pre class="base-tree">
       
    57 logging.Filterer --+    
       
    58                    |    
       
    59      logging.Handler --+
       
    60                        |
       
    61                       <strong class="uidshort">AntHandler</strong>
       
    62 </pre>
       
    63 
       
    64 <hr />
       
    65 Implement a logger hanlder that prints error message using an Ant object.
       
    66 See Python documentation on how to use it.
       
    67 e.g:
       
    68 logging.getLogger(&quot;&quot;).addHandler(AntHandler(anttask))
       
    69 This line will redirect messages to Ant logging system.<br /><br />
       
    70 
       
    71 <!-- ==================== INSTANCE METHODS ==================== -->
       
    72 <a name="section-InstanceMethods"></a>
       
    73 <table class="summary" border="1" cellpadding="3"
       
    74        cellspacing="0" width="100%" bgcolor="white">
       
    75 <tr bgcolor="#70b0f0" class="table-header">
       
    76   <td colspan="2" class="table-header">
       
    77     <table border="0" cellpadding="0" cellspacing="0" width="100%">
       
    78       <tr valign="top">
       
    79         <td align="left"><span class="table-header">Instance Methods</span></td>
       
    80         <td align="right" valign="top"
       
    81          ><span class="options">[<a href="#section-InstanceMethods"
       
    82          class="privatelink" onclick="toggle_private();"
       
    83          >hide private</a>]</span></td>
       
    84       </tr>
       
    85     </table>
       
    86   </td>
       
    87 </tr>
       
    88 <tr>
       
    89     <td width="15%" align="right" valign="top" class="summary">
       
    90       <span class="summary-type">&nbsp;</span>
       
    91     </td><td class="summary">
       
    92       <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
    93         <tr>
       
    94           <td><span class="summary-sig"><a href="ant.AntHandler-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
       
    95         <span class="summary-sig-arg">task</span>,
       
    96         <span class="summary-sig-arg">level</span>=<span class="summary-sig-default">logging.NOTSET</span>)</span><br />
       
    97       Initializes the instance - basically setting the formatter to None
       
    98 and the filter list to empty.</td>
       
    99           <td align="right" valign="top">
       
   100             <span class="codelink"><a href="ant-pysrc.html#AntHandler.__init__">source&nbsp;code</a></span>
       
   101             
       
   102           </td>
       
   103         </tr>
       
   104       </table>
       
   105       
       
   106     </td>
       
   107   </tr>
       
   108 <tr>
       
   109     <td width="15%" align="right" valign="top" class="summary">
       
   110       <span class="summary-type">&nbsp;</span>
       
   111     </td><td class="summary">
       
   112       <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
   113         <tr>
       
   114           <td><span class="summary-sig"><a href="ant.AntHandler-class.html#emit" class="summary-sig-name">emit</a>(<span class="summary-sig-arg">self</span>,
       
   115         <span class="summary-sig-arg">record</span>)</span><br />
       
   116       Handle the recordusing Ant.</td>
       
   117           <td align="right" valign="top">
       
   118             <span class="codelink"><a href="ant-pysrc.html#AntHandler.emit">source&nbsp;code</a></span>
       
   119             
       
   120           </td>
       
   121         </tr>
       
   122       </table>
       
   123       
       
   124     </td>
       
   125   </tr>
       
   126   <tr>
       
   127     <td colspan="2" class="summary">
       
   128     <p class="indent-wrapped-lines"><b>Inherited from <code>logging.Handler</code></b>:
       
   129       <code>acquire</code>,
       
   130       <code>close</code>,
       
   131       <code>createLock</code>,
       
   132       <code>flush</code>,
       
   133       <code>format</code>,
       
   134       <code>handle</code>,
       
   135       <code>handleError</code>,
       
   136       <code>release</code>,
       
   137       <code>setFormatter</code>,
       
   138       <code>setLevel</code>
       
   139       </p>
       
   140     <p class="indent-wrapped-lines"><b>Inherited from <code>logging.Filterer</code></b>:
       
   141       <code>addFilter</code>,
       
   142       <code>filter</code>,
       
   143       <code>removeFilter</code>
       
   144       </p>
       
   145     </td>
       
   146   </tr>
       
   147 </table>
       
   148 <!-- ==================== METHOD DETAILS ==================== -->
       
   149 <a name="section-MethodDetails"></a>
       
   150 <table class="details" border="1" cellpadding="3"
       
   151        cellspacing="0" width="100%" bgcolor="white">
       
   152 <tr bgcolor="#70b0f0" class="table-header">
       
   153   <td colspan="2" class="table-header">
       
   154     <table border="0" cellpadding="0" cellspacing="0" width="100%">
       
   155       <tr valign="top">
       
   156         <td align="left"><span class="table-header">Method Details</span></td>
       
   157         <td align="right" valign="top"
       
   158          ><span class="options">[<a href="#section-MethodDetails"
       
   159          class="privatelink" onclick="toggle_private();"
       
   160          >hide private</a>]</span></td>
       
   161       </tr>
       
   162     </table>
       
   163   </td>
       
   164 </tr>
       
   165 </table>
       
   166 <a name="__init__"></a>
       
   167 <div>
       
   168 <table class="details" border="1" cellpadding="3"
       
   169        cellspacing="0" width="100%" bgcolor="white">
       
   170 <tr><td>
       
   171   <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
   172   <tr valign="top"><td>
       
   173   <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
       
   174         <span class="sig-arg">task</span>,
       
   175         <span class="sig-arg">level</span>=<span class="sig-default">logging.NOTSET</span>)</span>
       
   176     <br /><em class="fname">(Constructor)</em>
       
   177   </h3>
       
   178   </td><td align="right" valign="top"
       
   179     ><span class="codelink"><a href="ant-pysrc.html#AntHandler.__init__">source&nbsp;code</a></span>&nbsp;
       
   180     </td>
       
   181   </table>
       
   182   
       
   183   Initializes the instance - basically setting the formatter to None
       
   184 and the filter list to empty.
       
   185   <dl class="fields">
       
   186     <dt>Overrides:
       
   187       logging.Handler.__init__
       
   188         <dd><em class="note">(inherited documentation)</em></dd>
       
   189     </dt>
       
   190   </dl>
       
   191 </td></tr></table>
       
   192 </div>
       
   193 <a name="emit"></a>
       
   194 <div>
       
   195 <table class="details" border="1" cellpadding="3"
       
   196        cellspacing="0" width="100%" bgcolor="white">
       
   197 <tr><td>
       
   198   <table width="100%" cellpadding="0" cellspacing="0" border="0">
       
   199   <tr valign="top"><td>
       
   200   <h3 class="epydoc"><span class="sig"><span class="sig-name">emit</span>(<span class="sig-arg">self</span>,
       
   201         <span class="sig-arg">record</span>)</span>
       
   202   </h3>
       
   203   </td><td align="right" valign="top"
       
   204     ><span class="codelink"><a href="ant-pysrc.html#AntHandler.emit">source&nbsp;code</a></span>&nbsp;
       
   205     </td>
       
   206   </table>
       
   207   
       
   208   Handle the recordusing Ant.
       
   209   <dl class="fields">
       
   210     <dt>Overrides:
       
   211       logging.Handler.emit
       
   212     </dt>
       
   213   </dl>
       
   214 </td></tr></table>
       
   215 </div>
       
   216 <br />
       
   217 <!-- ==================== NAVIGATION BAR ==================== -->
       
   218 <table class="navbar" border="0" width="100%" cellpadding="0"
       
   219        bgcolor="#a0c0ff" cellspacing="0">
       
   220   <tr valign="middle">
       
   221 
       
   222   <!-- Tree link -->
       
   223       <th>&nbsp;&nbsp;&nbsp;<a
       
   224         href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
       
   225 
       
   226   <!-- Index link -->
       
   227       <th>&nbsp;&nbsp;&nbsp;<a
       
   228         href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
       
   229 
       
   230   <!-- Help link -->
       
   231       <th>&nbsp;&nbsp;&nbsp;<a
       
   232         href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
       
   233 
       
   234       <th class="navbar" width="100%"></th>
       
   235   </tr>
       
   236 </table>
       
   237 <table border="0" cellpadding="0" cellspacing="0" width="100%%">
       
   238   <tr>
       
   239     <td align="left" class="footer">
       
   240     Generated by Epydoc 3.0beta1 on Wed Sep 09 13:44:16 2009
       
   241     </td>
       
   242     <td align="right" class="footer">
       
   243       <a href="http://epydoc.sourceforge.net">http://epydoc.sourceforge.net</a>
       
   244     </td>
       
   245   </tr>
       
   246 </table>
       
   247 
       
   248 <script type="text/javascript">
       
   249   <!--
       
   250   // Private objects are initially displayed (because if
       
   251   // javascript is turned off then we want them to be
       
   252   // visible); but by default, we want to hide them.  So hide
       
   253   // them unless we have a cookie that says to show them.
       
   254   checkCookie()
       
   255   // -->
       
   256 </script>
       
   257   
       
   258 </body>
       
   259 </html>