blob: 9c35c423271531e956c7fc2825ebdb7f9a0232e6 [file] [log] [blame]
<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&nbsp;Page</a> | <a class="qindex" href="modules.html">Modules</a> | <a class="qindex" href="hierarchy.html">Class&nbsp;Hierarchy</a> | <a class="qindex" href="classes.html">Alphabetical&nbsp;List</a> | <a class="qindex" href="annotated.html">Class&nbsp;List</a> | <a class="qindex" href="functions.html">Class&nbsp;Members</a> | <a class="qindex" href="pages.html">Related&nbsp;Pages</a></div>
<h1>ODBCAppender Class Reference</h1>Inheritance diagram for ODBCAppender:<p><center><img src="classlog4cxx_1_1db_1_1ODBCAppender__inherit__graph.png" border="0" usemap="#ODBCAppender__inherit__map" alt="Inheritance graph"></center>
<map name="ODBCAppender__inherit__map">
<area href="classlog4cxx_1_1AppenderSkeleton.html" shape="rect" coords="36,242,158,266" alt="">
<area href="classlog4cxx_1_1Appender.html" shape="rect" coords="13,168,85,191" alt="">
<area href="classlog4cxx_1_1spi_1_1OptionHandler.html" shape="rect" coords="6,93,102,117" alt="">
<area href="classlog4cxx_1_1helpers_1_1Object.html" shape="rect" coords="73,18,124,42" alt="">
<area href="classlog4cxx_1_1helpers_1_1ObjectImpl.html" shape="rect" coords="109,168,184,191" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center>Collaboration diagram for ODBCAppender:<p><center><img src="classlog4cxx_1_1db_1_1ODBCAppender__coll__graph.png" border="0" usemap="#ODBCAppender__coll__map" alt="Collaboration graph"></center>
<map name="ODBCAppender__coll__map">
<area href="classlog4cxx_1_1AppenderSkeleton.html" shape="rect" coords="69,346,192,370" alt="">
<area href="classlog4cxx_1_1Appender.html" shape="rect" coords="21,197,93,221" alt="">
<area href="classlog4cxx_1_1spi_1_1OptionHandler.html" shape="rect" coords="7,96,103,120" alt="">
<area href="classlog4cxx_1_1helpers_1_1Object.html" shape="rect" coords="80,18,131,42" alt="">
<area href="classlog4cxx_1_1helpers_1_1ObjectImpl.html" shape="rect" coords="100,146,174,170" alt="">
<area href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html" shape="rect" coords="168,197,240,221" alt="">
</map>
<center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classlog4cxx_1_1db_1_1ODBCAppender-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>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html#a2">setOption</a> (const String &amp;option, const String &amp;value)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html#a3">append</a> (const <a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">spi::LoggingEventPtr</a> &amp;event)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html#a4">close</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html#a5">flushBuffer</a> ()</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual bool&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html#a6">requiresLayout</a> () const </td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html#a7">setSql</a> (const String &amp;s)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>const String &amp;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html#a8">getSql</a> () const </td></tr>
<tr><td colspan=2><br><h2>Protected Member Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>String&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html#b0">getLogStatement</a> (const <a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">spi::LoggingEventPtr</a> &amp;event) const </td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html#b1">execute</a> (const String &amp;sql)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual void&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html#b2">closeConnection</a> (SQLHDBC con)</td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>virtual SQLHDBC&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html#b3">getConnection</a> ()</td></tr>
<tr><td colspan=2><br><h2>Protected Attributes</h2></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>String&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html#p0">databaseURL</a></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>String&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html#p1">databaseUser</a></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>String&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html#p2">databasePassword</a></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>SQLHDBC&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html#p3">connection</a></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>String&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html#p5">sqlStatement</a></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>size_t&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html#p6">bufferSize</a></td></tr>
<tr><td class="memItemLeft" nowrap align=right valign=top>std::list&lt; <a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">spi::LoggingEventPtr</a> &gt;&nbsp;</td><td class="memItemRight" valign=bottom><a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html#p7">buffer</a></td></tr>
</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<b>WARNING: This version of <a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html">ODBCAppender</a> is very likely to be completely replaced in the future. Moreoever, it does not log exceptions.</b> <p>
The <a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html">ODBCAppender</a> provides for sending log events to a database.<p>
Each append call adds to an <code>ArrayList</code> buffer. When the buffer is filled each log event is placed in a sql statement (configurable) and executed.<p>
<b>BufferSize</b>, <b>db URL</b>, <b>User</b>, &amp; <b>Password</b> are configurable options in the standard log4j ways.<p>
The <code>setSql(String sql)</code> sets the SQL statement to be used for logging -- this statement is sent to a <code><a class="el" href="classlog4cxx_1_1PatternLayout.html">PatternLayout</a></code> (either created automaticly by the appender or added by the user). Therefore by default all the conversion patterns in <code><a class="el" href="classlog4cxx_1_1PatternLayout.html">PatternLayout</a></code> can be used inside of the statement. (see the test cases for examples)<p>
Overriding the <a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html#b0">getLogStatement</a> method allows more explicit control of the statement used for logging.<p>
For use as a base class:<p>
<ul>
<li>
Override <a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html#b3">getConnection()</a> to pass any connection you want. Typically this is used to enable application wide connection pooling.<p>
</li>
<li>
Override closeConnection -- if you override getConnection make sure to implement <code>closeConnection</code> to handle the connection you generated. Typically this would return the connection to the pool it came from.<p>
</li>
<li>
Override getLogStatement to produce specialized or dynamic statements. The default uses the sql option value.<p>
</li>
</ul>
<p>
<hr><h2>Member Function Documentation</h2>
<a class="anchor" name="a3" doxytag="log4cxx::db::ODBCAppender::append" ></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 append </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const <a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">spi::LoggingEventPtr</a> &amp;&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>event</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Adds the event to the buffer. When full the buffer is flushed.
<p>
Implements <a class="el" href="classlog4cxx_1_1AppenderSkeleton.html#b0">AppenderSkeleton</a>. </td>
</tr>
</table>
<a class="anchor" name="a4" doxytag="log4cxx::db::ODBCAppender::close" ></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 close </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Closes the appender, flushing the buffer first then closing the default connection if it is open.
<p>
Implements <a class="el" href="classlog4cxx_1_1Appender.html#a4">Appender</a>. </td>
</tr>
</table>
<a class="anchor" name="b2" doxytag="log4cxx::db::ODBCAppender::closeConnection" ></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 closeConnection </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">SQLHDBC&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>con</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [protected, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Override this to return the connection to a pool, or to clean up the resource.<p>
The default behavior holds a single connection open until the appender is closed (typically when garbage collected). </td>
</tr>
</table>
<a class="anchor" name="b1" doxytag="log4cxx::db::ODBCAppender::execute" ></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 execute </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const String &amp;&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>sql</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [protected]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Override this to provide an alertnate method of getting connections (such as caching). One method to fix this is to open connections at the start of <a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html#a5">flushBuffer()</a> and close them at the end. I use a connection pool outside of <a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html">ODBCAppender</a> which is accessed in an override of this method. </td>
</tr>
</table>
<a class="anchor" name="a5" doxytag="log4cxx::db::ODBCAppender::flushBuffer" ></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 flushBuffer </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
loops through the buffer of LoggingEvents, gets a sql string from <a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html#b0">getLogStatement()</a> and sends it to <a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html#b1">execute()</a>. Errors are sent to the errorHandler.<p>
If a statement fails the LoggingEvent stays in the buffer! </td>
</tr>
</table>
<a class="anchor" name="b3" doxytag="log4cxx::db::ODBCAppender::getConnection" ></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"> SQLHDBC getConnection </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap><code> [protected, virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Override this to link with your connection pooling system.<p>
By default this creates a single connection which is held open until the object is garbage collected. </td>
</tr>
</table>
<a class="anchor" name="b0" doxytag="log4cxx::db::ODBCAppender::getLogStatement" ></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"> String getLogStatement </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const <a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">spi::LoggingEventPtr</a> &amp;&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>event</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap> const<code> [protected]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
By default getLogStatement sends the event to the required <a class="el" href="classlog4cxx_1_1Layout.html">Layout</a> object. The layout will format the given pattern into a workable SQL string.<p>
Overriding this provides direct access to the LoggingEvent when constructing the logging statement. </td>
</tr>
</table>
<a class="anchor" name="a8" doxytag="log4cxx::db::ODBCAppender::getSql" ></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 String&amp; getSql </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap> const<code> [inline]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Returns pre-formated statement eg: insert into LogTable (msg) values ("%m") </td>
</tr>
</table>
<a class="anchor" name="a6" doxytag="log4cxx::db::ODBCAppender::requiresLayout" ></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"> virtual bool requiresLayout </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="mdname1" valign="top" nowrap> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</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>
&nbsp;
</td>
<td>
<p>
<a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html">ODBCAppender</a> requires a layout.
<p>
Implements <a class="el" href="classlog4cxx_1_1Appender.html#a12">Appender</a>. </td>
</tr>
</table>
<a class="anchor" name="a2" doxytag="log4cxx::db::ODBCAppender::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">(&nbsp;</td>
<td class="md" nowrap valign="top">const String &amp;&nbsp;</td>
<td class="mdname" nowrap> <em>option</em>, </td>
</tr>
<tr>
<td></td>
<td></td>
<td class="md" nowrap>const String &amp;&nbsp;</td>
<td class="mdname" nowrap> <em>value</em></td>
</tr>
<tr>
<td></td>
<td class="md">)&nbsp;</td>
<td class="md" colspan="2"><code> [virtual]</code></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Set options
<p>
Reimplemented from <a class="el" href="classlog4cxx_1_1AppenderSkeleton.html#a3">AppenderSkeleton</a>. </td>
</tr>
</table>
<a class="anchor" name="a7" doxytag="log4cxx::db::ODBCAppender::setSql" ></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 setSql </td>
<td class="md" valign="top">(&nbsp;</td>
<td class="md" nowrap valign="top">const String &amp;&nbsp;</td>
<td class="mdname1" valign="top" nowrap> <em>s</em> </td>
<td class="md" valign="top">&nbsp;)&nbsp;</td>
<td class="md" nowrap></td>
</tr>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Set pre-formated statement eg: insert into LogTable (msg) values ("%m") </td>
</tr>
</table>
<hr><h2>Member Data Documentation</h2>
<a class="anchor" name="p7" doxytag="log4cxx::db::ODBCAppender::buffer" ></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"> std::list&lt;<a class="el" href="classlog4cxx_1_1helpers_1_1ObjectPtrT.html">spi::LoggingEventPtr</a>&gt; <a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html#p7">buffer</a><code> [protected]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
ArrayList holding the buffer of Logging Events. </td>
</tr>
</table>
<a class="anchor" name="p6" doxytag="log4cxx::db::ODBCAppender::bufferSize" ></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"> size_t <a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html#p6">bufferSize</a><code> [protected]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
size of LoggingEvent buffer before writting to the database. Default is 1. </td>
</tr>
</table>
<a class="anchor" name="p3" doxytag="log4cxx::db::ODBCAppender::connection" ></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"> SQLHDBC <a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html#p3">connection</a><code> [protected]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Connection used by default. The connection is opened the first time it is needed and then held open until the appender is closed (usually at garbage collection). This behavior is best modified by creating a sub-class and overriding the <code>getConnection</code> and <code>closeConnection</code> methods. </td>
</tr>
</table>
<a class="anchor" name="p2" doxytag="log4cxx::db::ODBCAppender::databasePassword" ></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"> String <a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html#p2">databasePassword</a><code> [protected]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
User to use for default connection handling </td>
</tr>
</table>
<a class="anchor" name="p0" doxytag="log4cxx::db::ODBCAppender::databaseURL" ></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"> String <a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html#p0">databaseURL</a><code> [protected]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
URL of the DB for default connection handling </td>
</tr>
</table>
<a class="anchor" name="p1" doxytag="log4cxx::db::ODBCAppender::databaseUser" ></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"> String <a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html#p1">databaseUser</a><code> [protected]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
User to connect as for default connection handling </td>
</tr>
</table>
<a class="anchor" name="p5" doxytag="log4cxx::db::ODBCAppender::sqlStatement" ></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"> String <a class="el" href="classlog4cxx_1_1db_1_1ODBCAppender.html#p5">sqlStatement</a><code> [protected]</code>
</table>
</td>
</tr>
</table>
<table cellspacing=5 cellpadding=0 border=0>
<tr>
<td>
&nbsp;
</td>
<td>
<p>
Stores the string given to the pattern layout for conversion into a SQL statement, eg: insert into LogTable (Thread, File, Message) values ("%t", "%F", "%m")<p>
Be careful of quotes in your messages!<p>
Also see <a class="el" href="classlog4cxx_1_1PatternLayout.html">PatternLayout</a>. </td>
</tr>
</table>
<hr>The documentation for this class was generated from the following files:<ul>
<li>odbcappender.h<li>odbcappender.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 &#169; 1999-2004, Apache Software Foundation
</em></font></div>
</td></tr>
</table>
<!-- END main table -->
</body>
</html>
<!-- end the processing -->