| <html> |
| <head> |
| <title> |
| log4cxx - Documentation |
| </title> |
| <link href="../css/doxygen.css" rel="stylesheet" type="text/css"/> |
| </head> |
| |
| <body bgcolor="#ffffff" text="#000000" link="#525D76"> |
| <!-- START Header table --> |
| <table border="0" cellspacing="0" width="90%"> |
| <!-- TOP IMAGE --> |
| <tr> |
| <td colspan="2"> |
| <a href="http://logging.apache.org"> |
| <img src="http://logging.apache.org/images/ls-logo.jpg" align="left" border="0"/> |
| </a> |
| </td> |
| |
| </tr> |
| </table> |
| <!-- END Header table --> |
| |
| <!-- START main table --> |
| <table id="main" border="0" width="90%" cellspacing="2" cellpadding="0"> |
| <tr><td colspan="2"> |
| <hr noshade="" size="1"/> |
| </td></tr> |
| |
| <tr> |
| <!-- LEFT SIDE NAVIGATION --> |
| <td id="navbar" valign="top"> |
| <!-- ============================================================ --> |
| <table id="navbar" border="0" cellspacing="0" cellpadding="0"> |
| <tr > |
| <td class="navbarHeader" nowrap="true"> |
| <strong>Apache</strong> |
| </td> |
| </tr> |
| <tr><td class="navbarItem"><small> <a href="http://www.apache.org">Apache Home</a> |
| </small></td></tr> |
| <tr><td class="navbarItem"><small> <a href="http://logging.apache.org/">Logging Services</a> |
| </small></td></tr> |
| <tr > |
| <td class="navbarHeader" nowrap="true"> |
| <strong>log4cxx project</strong> |
| </td> |
| </tr> |
| <tr><td class="navbarItem"><small> <a href="../index.html">About</a> |
| </small></td></tr> |
| <tr><td class="navbarItem"><small> <a href="../news.html">News</a> |
| </small></td></tr> |
| <tr><td class="navbarItem"><small> <a href="../team.html">Team</a> |
| </small></td></tr> |
| <tr><td class="navbarItem"><small> <a href="../manual/index.html">Documentation</a> |
| </small></td></tr> |
| <tr><td class="navbarItem"><small> <a href="../performance.html">Performance</a> |
| </small></td></tr> |
| <tr><td class="navbarItem"><small> <a href="../download.html">Download</a> |
| </small></td></tr> |
| </table> |
| |
| </td> |
| <td id="mainContents" align="left" valign="top"> |
| <hr> |
| <!-- Generated by Doxygen 1.3.5 --> |
| <div class="qindex"><a class="qindex" href="index.html">Main Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical List</a> | <a class="qindex" href="annotated.html">Class List</a> | <a class="qindex" href="functions.html">Class Members</a> | <a class="qindex" href="pages.html">Related Pages</a></div> |
| <h1>FallbackErrorHandler Class Reference</h1>Inheritance diagram for FallbackErrorHandler:<p><center><img src="classlog4cxx_1_1varia_1_1FallbackErrorHandler__inherit__graph.png" border="0" usemap="#FallbackErrorHandler__inherit__map" alt="Inheritance graph"></center> |
| <map name="FallbackErrorHandler__inherit__map"> |
| <area href="classlog4cxx_1_1spi_1_1ErrorHandler.html" shape="rect" coords="7,168,92,192" alt=""> |
| <area href="classlog4cxx_1_1spi_1_1OptionHandler.html" shape="rect" coords="11,93,106,117" alt=""> |
| <area href="classlog4cxx_1_1helpers_1_1Object.html" shape="rect" coords="77,19,128,43" alt=""> |
| <area href="classlog4cxx_1_1helpers_1_1ObjectImpl.html" shape="rect" coords="116,168,190,192" alt=""> |
| </map> |
| <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for FallbackErrorHandler:<p><center><img src="classlog4cxx_1_1varia_1_1FallbackErrorHandler__coll__graph.png" border="0" usemap="#FallbackErrorHandler__coll__map" alt="Collaboration graph"></center> |
| <map name="FallbackErrorHandler__coll__map"> |
| <area href="classlog4cxx_1_1spi_1_1ErrorHandler.html" shape="rect" coords="13,197,98,221" alt=""> |
| <area href="classlog4cxx_1_1spi_1_1OptionHandler.html" shape="rect" coords="6,96,102,120" alt=""> |
| <area href="classlog4cxx_1_1helpers_1_1Object.html" shape="rect" coords="80,18,130,42" alt=""> |
| <area href="classlog4cxx_1_1helpers_1_1ObjectImpl.html" shape="rect" coords="101,146,176,170" alt=""> |
| <area href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html" shape="rect" coords="176,197,248,221" alt=""> |
| </map> |
| <center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classlog4cxx_1_1varia_1_1FallbackErrorHandler-members.html">List of all members.</a><table border=0 cellpadding=0 cellspacing=0> |
| <tr><td></td></tr> |
| <tr><td colspan=2><br><h2>Public Member Functions</h2></td></tr> |
| <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1varia_1_1FallbackErrorHandler.html#a1">setLogger</a> (const <a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">LoggerPtr</a> &logger)</td></tr> |
| |
| <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1varia_1_1FallbackErrorHandler.html#a2">activateOptions</a> ()</td></tr> |
| |
| <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1varia_1_1FallbackErrorHandler.html#a3">setOption</a> (const String &name, const String &value)</td></tr> |
| |
| <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1varia_1_1FallbackErrorHandler.html#a4">error</a> (const String &message, <a class="el" href="classlog4cxx_1_1helpers_1_1Exception.html">helpers::Exception</a> &e, int errorCode) const </td></tr> |
| |
| <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1varia_1_1FallbackErrorHandler.html#a5">error</a> (const String &message, <a class="el" href="classlog4cxx_1_1helpers_1_1Exception.html">helpers::Exception</a> &e, int errorCode, const <a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">spi::LoggingEventPtr</a> &event) const </td></tr> |
| |
| <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1varia_1_1FallbackErrorHandler.html#a6">error</a> (const String &message) const </td></tr> |
| |
| <tr><td class="memItemLeft" nowrap align=right valign=top>const <a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">AppenderPtr</a> & </td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1varia_1_1FallbackErrorHandler.html#a7">getBackupAppender</a> () const </td></tr> |
| |
| <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1varia_1_1FallbackErrorHandler.html#a8">setAppender</a> (const <a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">AppenderPtr</a> &primary)</td></tr> |
| |
| <tr><td class="memItemLeft" nowrap align=right valign=top>void </td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1varia_1_1FallbackErrorHandler.html#a9">setBackupAppender</a> (const <a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">AppenderPtr</a> &backup)</td></tr> |
| |
| </table> |
| <hr><a name="_details"></a><h2>Detailed Description</h2> |
| The <code><a class="el" href="classlog4cxx_1_1varia_1_1FallbackErrorHandler.html">FallbackErrorHandler</a></code> implements the ErrorHandler interface such that a secondary appender may be specified. This secondary appender takes over if the primary appender fails for whatever reason.<p> |
| The error message is printed on <code>System.err</code>, and logged in the new secondary appender. |
| <p> |
| <hr><h2>Member Function Documentation</h2> |
| <a class="anchor" name="a2" doxytag="log4cxx::varia::FallbackErrorHandler::activateOptions" ></a><p> |
| <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
| <tr> |
| <td class="mdRow"> |
| <table cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td class="md" nowrap valign="top"> void activateOptions </td> |
| <td class="md" valign="top">( </td> |
| <td class="mdname1" valign="top" nowrap> </td> |
| <td class="md" valign="top"> ) </td> |
| <td class="md" nowrap><code> [virtual]</code></td> |
| </tr> |
| |
| </table> |
| </td> |
| </tr> |
| </table> |
| <table cellspacing=5 cellpadding=0 border=0> |
| <tr> |
| <td> |
| |
| </td> |
| <td> |
| |
| <p> |
| No options to activate. |
| <p> |
| Implements <a class="el" href="classlog4cxx_1_1spi_1_1OptionHandler.html#a1">OptionHandler</a>. </td> |
| </tr> |
| </table> |
| <a class="anchor" name="a6" doxytag="log4cxx::varia::FallbackErrorHandler::error" ></a><p> |
| <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
| <tr> |
| <td class="mdRow"> |
| <table cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td class="md" nowrap valign="top"> void error </td> |
| <td class="md" valign="top">( </td> |
| <td class="md" nowrap valign="top">const String & </td> |
| <td class="mdname1" valign="top" nowrap> <em>message</em> </td> |
| <td class="md" valign="top"> ) </td> |
| <td class="md" nowrap> const<code> [inline, virtual]</code></td> |
| </tr> |
| |
| </table> |
| </td> |
| </tr> |
| </table> |
| <table cellspacing=5 cellpadding=0 border=0> |
| <tr> |
| <td> |
| |
| </td> |
| <td> |
| |
| <p> |
| Print a the error message passed as parameter on <code>System.err</code>. |
| <p> |
| Implements <a class="el" href="classlog4cxx_1_1spi_1_1ErrorHandler.html#a3">ErrorHandler</a>. </td> |
| </tr> |
| </table> |
| <a class="anchor" name="a5" doxytag="log4cxx::varia::FallbackErrorHandler::error" ></a><p> |
| <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
| <tr> |
| <td class="mdRow"> |
| <table cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td class="md" nowrap valign="top"> void error </td> |
| <td class="md" valign="top">( </td> |
| <td class="md" nowrap valign="top">const String & </td> |
| <td class="mdname" nowrap> <em>message</em>, </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td></td> |
| <td class="md" nowrap><a class="el" href="classlog4cxx_1_1helpers_1_1Exception.html">helpers::Exception</a> & </td> |
| <td class="mdname" nowrap> <em>e</em>, </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td></td> |
| <td class="md" nowrap>int </td> |
| <td class="mdname" nowrap> <em>errorCode</em>, </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td></td> |
| <td class="md" nowrap>const <a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">spi::LoggingEventPtr</a> & </td> |
| <td class="mdname" nowrap> <em>event</em></td> |
| </tr> |
| <tr> |
| <td></td> |
| <td class="md">) </td> |
| <td class="md" colspan="2"> const</td> |
| </tr> |
| |
| </table> |
| </td> |
| </tr> |
| </table> |
| <table cellspacing=5 cellpadding=0 border=0> |
| <tr> |
| <td> |
| |
| </td> |
| <td> |
| |
| <p> |
| Prints the message and the stack trace of the exception on <code>System.err</code>. </td> |
| </tr> |
| </table> |
| <a class="anchor" name="a4" doxytag="log4cxx::varia::FallbackErrorHandler::error" ></a><p> |
| <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
| <tr> |
| <td class="mdRow"> |
| <table cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td class="md" nowrap valign="top"> void error </td> |
| <td class="md" valign="top">( </td> |
| <td class="md" nowrap valign="top">const String & </td> |
| <td class="mdname" nowrap> <em>message</em>, </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td></td> |
| <td class="md" nowrap><a class="el" href="classlog4cxx_1_1helpers_1_1Exception.html">helpers::Exception</a> & </td> |
| <td class="mdname" nowrap> <em>e</em>, </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td></td> |
| <td class="md" nowrap>int </td> |
| <td class="mdname" nowrap> <em>errorCode</em></td> |
| </tr> |
| <tr> |
| <td></td> |
| <td class="md">) </td> |
| <td class="md" colspan="2"> const<code> [virtual]</code></td> |
| </tr> |
| |
| </table> |
| </td> |
| </tr> |
| </table> |
| <table cellspacing=5 cellpadding=0 border=0> |
| <tr> |
| <td> |
| |
| </td> |
| <td> |
| |
| <p> |
| Prints the message and the stack trace of the exception on <code>System.err</code>. |
| <p> |
| Implements <a class="el" href="classlog4cxx_1_1spi_1_1ErrorHandler.html#a2">ErrorHandler</a>. </td> |
| </tr> |
| </table> |
| <a class="anchor" name="a7" doxytag="log4cxx::varia::FallbackErrorHandler::getBackupAppender" ></a><p> |
| <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
| <tr> |
| <td class="mdRow"> |
| <table cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td class="md" nowrap valign="top"> const <a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">AppenderPtr</a>& getBackupAppender </td> |
| <td class="md" valign="top">( </td> |
| <td class="mdname1" valign="top" nowrap> </td> |
| <td class="md" valign="top"> ) </td> |
| <td class="md" nowrap> const<code> [inline]</code></td> |
| </tr> |
| |
| </table> |
| </td> |
| </tr> |
| </table> |
| <table cellspacing=5 cellpadding=0 border=0> |
| <tr> |
| <td> |
| |
| </td> |
| <td> |
| |
| <p> |
| Return the backup appender. </td> |
| </tr> |
| </table> |
| <a class="anchor" name="a8" doxytag="log4cxx::varia::FallbackErrorHandler::setAppender" ></a><p> |
| <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
| <tr> |
| <td class="mdRow"> |
| <table cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td class="md" nowrap valign="top"> void setAppender </td> |
| <td class="md" valign="top">( </td> |
| <td class="md" nowrap valign="top">const <a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">AppenderPtr</a> & </td> |
| <td class="mdname1" valign="top" nowrap> <em>primary</em> </td> |
| <td class="md" valign="top"> ) </td> |
| <td class="md" nowrap><code> [virtual]</code></td> |
| </tr> |
| |
| </table> |
| </td> |
| </tr> |
| </table> |
| <table cellspacing=5 cellpadding=0 border=0> |
| <tr> |
| <td> |
| |
| </td> |
| <td> |
| |
| <p> |
| The appender to which this error handler is attached. |
| <p> |
| Implements <a class="el" href="classlog4cxx_1_1spi_1_1ErrorHandler.html#a5">ErrorHandler</a>. </td> |
| </tr> |
| </table> |
| <a class="anchor" name="a9" doxytag="log4cxx::varia::FallbackErrorHandler::setBackupAppender" ></a><p> |
| <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
| <tr> |
| <td class="mdRow"> |
| <table cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td class="md" nowrap valign="top"> void setBackupAppender </td> |
| <td class="md" valign="top">( </td> |
| <td class="md" nowrap valign="top">const <a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">AppenderPtr</a> & </td> |
| <td class="mdname1" valign="top" nowrap> <em>backup</em> </td> |
| <td class="md" valign="top"> ) </td> |
| <td class="md" nowrap><code> [virtual]</code></td> |
| </tr> |
| |
| </table> |
| </td> |
| </tr> |
| </table> |
| <table cellspacing=5 cellpadding=0 border=0> |
| <tr> |
| <td> |
| |
| </td> |
| <td> |
| |
| <p> |
| Set the backup appender. |
| <p> |
| Implements <a class="el" href="classlog4cxx_1_1spi_1_1ErrorHandler.html#a6">ErrorHandler</a>. </td> |
| </tr> |
| </table> |
| <a class="anchor" name="a1" doxytag="log4cxx::varia::FallbackErrorHandler::setLogger" ></a><p> |
| <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
| <tr> |
| <td class="mdRow"> |
| <table cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td class="md" nowrap valign="top"> void setLogger </td> |
| <td class="md" valign="top">( </td> |
| <td class="md" nowrap valign="top">const <a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">LoggerPtr</a> & </td> |
| <td class="mdname1" valign="top" nowrap> <em>logger</em> </td> |
| <td class="md" valign="top"> ) </td> |
| <td class="md" nowrap><code> [virtual]</code></td> |
| </tr> |
| |
| </table> |
| </td> |
| </tr> |
| </table> |
| <table cellspacing=5 cellpadding=0 border=0> |
| <tr> |
| <td> |
| |
| </td> |
| <td> |
| |
| <p> |
| <em>Adds</em> the logger passed as parameter to the list of loggers that we need to search for in case of appender failure. |
| <p> |
| Implements <a class="el" href="classlog4cxx_1_1spi_1_1ErrorHandler.html#a1">ErrorHandler</a>. </td> |
| </tr> |
| </table> |
| <a class="anchor" name="a3" doxytag="log4cxx::varia::FallbackErrorHandler::setOption" ></a><p> |
| <table class="mdTable" width="100%" cellpadding="2" cellspacing="0"> |
| <tr> |
| <td class="mdRow"> |
| <table cellpadding="0" cellspacing="0" border="0"> |
| <tr> |
| <td class="md" nowrap valign="top"> void setOption </td> |
| <td class="md" valign="top">( </td> |
| <td class="md" nowrap valign="top">const String & </td> |
| <td class="mdname" nowrap> <em>name</em>, </td> |
| </tr> |
| <tr> |
| <td></td> |
| <td></td> |
| <td class="md" nowrap>const String & </td> |
| <td class="mdname" nowrap> <em>value</em></td> |
| </tr> |
| <tr> |
| <td></td> |
| <td class="md">) </td> |
| <td class="md" colspan="2"><code> [virtual]</code></td> |
| </tr> |
| |
| </table> |
| </td> |
| </tr> |
| </table> |
| <table cellspacing=5 cellpadding=0 border=0> |
| <tr> |
| <td> |
| |
| </td> |
| <td> |
| |
| <p> |
| Set <code>option</code> to <code>value</code>.<p> |
| The handling of each option depends on the OptionHandler instance. Some options may become active immediately whereas other may be activated only when <a class="el" href="classlog4cxx_1_1varia_1_1FallbackErrorHandler.html#a2">activateOptions</a> is called. |
| <p> |
| Implements <a class="el" href="classlog4cxx_1_1spi_1_1OptionHandler.html#a2">OptionHandler</a>. </td> |
| </tr> |
| </table> |
| <hr>The documentation for this class was generated from the following files:<ul> |
| <li>fallbackerrorhandler.h<li>fallbackerrorhandler.cpp</ul> |
| |
| </td> |
| </tr> |
| |
| <!-- FOOTER --> |
| <tr><td colspan="2"> |
| <hr noshade="" size="1"/> |
| </td></tr> |
| <tr><td colspan="2"> |
| <div align="center"><font color="#525D76" size="-1"><em> |
| Copyright © 1999-2004, Apache Software Foundation |
| </em></font></div> |
| </td></tr> |
| </table> |
| <!-- END main table --> |
| </body> |
| </html> |
| <!-- end the processing --> |