Holger's
Java API

com.antelmann.util.logging
Class StringLineFormatter

java.lang.Object
  extended by com.antelmann.util.logging.StringLineFormatter
All Implemented Interfaces:
LogEntryFormatter<String>

public class StringLineFormatter
extends Object
implements LogEntryFormatter<String>

formats a LogEntry into a simple one-line String terminated by a line break.

Author:
Holger Antelmann

Field Summary
protected  SimpleDateFormat timeFormat
           
 
Constructor Summary
StringLineFormatter()
           
 
Method Summary
 String formatLogEntry(LogEntry entry)
          This method returns a one-line String of the entry terminated by a line separator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

timeFormat

protected SimpleDateFormat timeFormat
Constructor Detail

StringLineFormatter

public StringLineFormatter()
Method Detail

formatLogEntry

public String formatLogEntry(LogEntry entry)
This method returns a one-line String of the entry terminated by a line separator. The format is: "[time level] message (param1, param2, ..) (thrown)"
The other parameters are ignored.

Specified by:
formatLogEntry in interface LogEntryFormatter<String>


(c) 2001-2006 Holger Antelmann - all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads