org.apache.log4j.jdbcplus.examples
Class SqlHandler

java.lang.Object
  |
  +--org.apache.log4j.jdbcplus.examples.SqlHandler
All Implemented Interfaces:
JDBCSqlHandler

public class SqlHandler
extends Object
implements JDBCSqlHandler

Custom JDBC SQLHandler to handle statement creation for log statements

Since:
2.0
Version:
see jdbcappender.jar/META-INF/MANIFEST.MF for version information
Author:
Danko Mannhaupt

Constructor Summary
SqlHandler()
           
 
Method Summary
 String getStatement(LoggingEvent event)
          return database SQL statement to log logging event
protected  String replaceProblematicChars(String aString)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SqlHandler

public SqlHandler()
Method Detail

getStatement

public String getStatement(LoggingEvent event)
                    throws Exception
return database SQL statement to log logging event

Specified by:
getStatement in interface JDBCSqlHandler
Parameters:
event - the event
Returns:
SQL insert statement
Throws:
Exception - if any error occurs
See Also:
JDBCSqlHandler.getStatement(LoggingEvent)

replaceProblematicChars

protected String replaceProblematicChars(String aString)


Copyright 2000-2004 Apache Software Foundation.