Syslog: White Paper FAQ Examples JavaDoc
Protomatter Classes v1.1.6

com.protomatter.syslog.xml
Class DatabaseLog_Helper

java.lang.Object
  |
  +--com.protomatter.syslog.xml.BasicLogger_Helper
        |
        +--com.protomatter.syslog.xml.DatabaseLog_Helper
All Implemented Interfaces:
XMLConfigHelper

public class DatabaseLog_Helper
extends BasicLogger_Helper

XML configuration helper for DatabaseLog.


Constructor Summary
DatabaseLog_Helper()
           
 
Method Summary
 void configure(java.lang.Object o, org.jdom.Element e)
          Configure this logger given the XML element.
 org.jdom.Element getConfiguration(java.lang.Object o, org.jdom.Element element)
          Encode the given object's configuration into the given XML element.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DatabaseLog_Helper

public DatabaseLog_Helper()
Method Detail

configure

public void configure(java.lang.Object o,
                      org.jdom.Element e)
               throws SyslogInitException
Configure this logger given the XML element. The <Logger> element should look like this:



  <Logger class="com.protomatter.syslog.DatabaseLog" >

    <!--
     Config params from BasicLogger_Helper can
     get inserted here.
    -->

    <!--
     The <Format> tag is included here, as it is used
     to set field truncation sizes.
    -->
    <Format class="com.protomatter.syslog.SimpleSyslogTextFormatter">
      <classWidth>column-width</classWidth>
      <channelWidth>column-width</channelWidth>
      <threadWidth>column-width</threadWidth>
      <hostWidth>column-width</hostWidth>
    </Format>

    <messageWidth>column-width</messageWidth>
    <detailWidth>column-width</detailWidth>

    <driver>JDBCDriver</driver>
    <url>JDBC-URL</url>
    <tablePrefix>TablePrefix</tablePrefix>
    <numRetries>NumRetries</numRetries>

    <statementAdapter>StatementAdapterClass</statementAdapter>

    <ConnectionProperties>
      <property>
        <name>name-1</name>
        <value>value-1</value>
      </property>
      <property>
        <name>name-2</name>
        <value>value-2</value>
      </property>
      ...
      <property>
        <name>name-N</name>
        <value>value-N</value>
      </property>
    </ConnectionProperties>

  </Logger>
  

Element
name value required
messageWidth Short message column width. no (default is 255)
detailWidth Short message detail width. no (default is 4000)
driver JDBC Driver class name yes
url JDBC connection URL yes
tablePrefix A prefix for table names no
numRetries Number of times to retry writing each message no (default is 3)
statementAdapter Full classname of the database statement adapter. no (default is "StringDatabaseStatementAdapter")
ConnectionProperties Contains a set of <property> elements, each containing a <name> and <value> elements defining the connection properties. no

Overrides:
configure in class BasicLogger_Helper
Following copied from class: com.protomatter.syslog.xml.BasicLogger_Helper
See Also:
SimpleSyslogTextFormatter_Helper.configure(Object,Element), HTMLSyslogTextFormatter_Helper.configure(Object,Element), SimpleLogPolicy_Helper.configure(Object,Element), PerClassPolicy_Helper.configure(Object,Element)

getConfiguration

public org.jdom.Element getConfiguration(java.lang.Object o,
                                         org.jdom.Element element)
Description copied from interface: XMLConfigHelper
Encode the given object's configuration into the given XML element.
Overrides:
getConfiguration in class BasicLogger_Helper

Protomatter Classes v1.1.6
Copyright 1998-2001 Nate Sammons

Protomatter Classes v1.1.6 http://protomatter.sourceforge.net/1.1.6