com.antelmann.util.logging
Class StringLineFormatter
java.lang.Object
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
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
StringLineFormatter
public StringLineFormatter()
- uses the platform line-break; see
Strings.lb
StringLineFormatter
public StringLineFormatter(String timeFormat,
String lineBreak)
StringLineFormatter
public StringLineFormatter(DateFormat timeFormat)
StringLineFormatter
public StringLineFormatter(DateFormat timeFormat,
String lineBreak)
getLineBreak
public String getLineBreak()
setLineBreak
public StringLineFormatter setLineBreak(String lb)
setShowOrigin
public StringLineFormatter setShowOrigin(boolean flag)
isShowOrigin
public boolean isShowOrigin()
getMaxParams
public int getMaxParams()
setMaxParams
public StringLineFormatter setMaxParams(int maxParams)
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) Holger Antelmann since 2001- all rights reserved (contact: info@antelmann.com)
see www.antelmann.com/developer for further details and available downloads