Package org.apache.juli
Class OneLineFormatter
- java.lang.Object
- 
- java.util.logging.Formatter
- 
- org.apache.juli.OneLineFormatter
 
 
- 
 public class OneLineFormatter extends java.util.logging.FormatterProvides same information as default log format but on a single line to make it easier to grep the logs. The only exception is stacktraces which are always preceded by whitespace to make it simple to skip them.
- 
- 
Constructor SummaryConstructors Constructor Description OneLineFormatter()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddTimestamp(java.lang.StringBuilder buf, long timestamp)java.lang.Stringformat(java.util.logging.LogRecord record)java.lang.StringgetTimeFormat()Obtain the format currently being used for time stamps in log messages.voidsetTimeFormat(java.lang.String timeFormat)Specify the time format to use for time stamps in log messages.
 
- 
- 
- 
Method Detail- 
setTimeFormatpublic void setTimeFormat(java.lang.String timeFormat) Specify the time format to use for time stamps in log messages.- Parameters:
- timeFormat- The format to use using the- SimpleDateFormatsyntax
 
 - 
getTimeFormatpublic java.lang.String getTimeFormat() Obtain the format currently being used for time stamps in log messages.- Returns:
- The current format in SimpleDateFormatsyntax
 
 - 
formatpublic java.lang.String format(java.util.logging.LogRecord record) - Specified by:
- formatin class- java.util.logging.Formatter
 
 - 
addTimestampprotected void addTimestamp(java.lang.StringBuilder buf, long timestamp)
 
- 
 
-