com.antelmann.util.logging
Class SampleSQLLogFormatter
java.lang.Object
com.antelmann.util.logging.SampleSQLLogFormatter
- All Implemented Interfaces:
- LogEntryFormatter<Object[]>
public class SampleSQLLogFormatter
- extends Object
- implements LogEntryFormatter<Object[]>
NOT QUITE DONE, YET.
a sample implementation that writes/reads LogEntry objects to/from a Connection object.
The tableName given in the constructor is expected to have the following field names
(in their respective order), where every field (except the entry_time field) is to be
of a type that can handle a String:
- entry_level
- entry_message
- entry_time
- entry_sourceClass
- entry_sourceString
- entry_throwable
- entry_thread
- param0
- param1
- param2
- param3
param4
- Author:
- Holger Antelmann
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SampleSQLLogFormatter
public SampleSQLLogFormatter(Connection con,
String tableName,
int charLimit)
getLogEntries
public ArrayList<LogEntry> getLogEntries(Date from,
Date until,
Filter<LogEntry> filter)
throws SQLException
- null parameter mean that no restriction applies
- Throws:
SQLException
extractLogEntry
protected LogEntry extractLogEntry(ResultSet rs)
throws SQLException
- Throws:
SQLException
formatLogEntry
public Object[] formatLogEntry(LogEntry entry)
- Specified by:
formatLogEntry in interface LogEntryFormatter<Object[]>
(c) 2001-2006 Holger Antelmann - all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads