com.antelmann.util.logging
Class DBLineLogFormatter
java.lang.Object
com.antelmann.util.logging.DBLineLogFormatter
- All Implemented Interfaces:
- LogEntryFormatter<String>
public class DBLineLogFormatter
- extends Object
- implements LogEntryFormatter<String>
formats a LogEntry into a format that can be easily imported into databases.
- Author:
- Holger Antelmann
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
timeFormat
protected SimpleDateFormat timeFormat
DBLineLogFormatter
public DBLineLogFormatter()
formatLogEntry
public String formatLogEntry(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:
formatLogEntry in interface LogEntryFormatter<String>
getHeaderLine
public String getHeaderLine()
(c) 2001-2006 Holger Antelmann - all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads