org.jscience.util.logging
Class DBLineLogFormatter

java.lang.Object
  extended by org.jscience.util.logging.DBLineLogFormatter
All Implemented Interfaces:
LogEntryFormatter

public class DBLineLogFormatter
extends java.lang.Object
implements LogEntryFormatter

formats a LogEntry into a format that can be easily imported into databases.


Field Summary
protected  java.text.SimpleDateFormat timeFormat
          DOCUMENT ME!
 
Constructor Summary
DBLineLogFormatter()
           
 
Method Summary
 java.lang.Object format(LogEntry entry)
          This method returns a one-line dif-like formattedd String of the entry terminated by a line separator.
 java.lang.String getHeaderLine()
          DOCUMENT ME!
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

timeFormat

protected java.text.SimpleDateFormat timeFormat
DOCUMENT ME!

Constructor Detail

DBLineLogFormatter

public DBLineLogFormatter()
Method Detail

format

public java.lang.Object format(LogEntry entry)
This method returns a one-line dif-like formattedd String of the entry terminated by a line separator. The parameters are:
time, level, message, sourceClass, thrown, threadName, param1, param2, etc.
The time field is either written as milliseconds or as a String, depending on the value of the boolean member timeAsString of this class. At least one parameter field will be written, even if entry.parameters is null. If any value is null, empty quotations will be put instead of the String.

Specified by:
format in interface LogEntryFormatter
Parameters:
entry - DOCUMENT ME!
Returns:
DOCUMENT ME!

getHeaderLine

public java.lang.String getHeaderLine()
DOCUMENT ME!

Returns:
DOCUMENT ME!