Package org.sosy_lab.common.log
Class TimestampedLogFormatter
java.lang.Object
java.util.logging.Formatter
org.sosy_lab.common.log.TimestampedLogFormatter
- Direct Known Subclasses:
FileLogFormatter
Log formatter that produces output containing a timestamp. Each log message will look like this:
timestamp Level (component:class.method) message
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Stringvoidformat(LogRecord lr, StringBuilder sb) FormatsLogRecordusing the providedStringBuilder.
This method corresponds toFormatter.format(LogRecord)in a template method pattern.toString()static Formatterstatic FormatterMethods inherited from class java.util.logging.Formatter
formatMessage, getHead, getTail
-
Constructor Details
-
TimestampedLogFormatter
protected TimestampedLogFormatter(boolean useColors)
-
-
Method Details
-
format
FormatsLogRecordusing the providedStringBuilder.
This method corresponds toFormatter.format(LogRecord)in a template method pattern. The coloring behaviour is provided by superclass.- Parameters:
lr- theLogRecordto format.sb- theStringBuilderforLogRecordformatting.- See Also:
-
withoutColors
-
withColorsIfPossible
-
format
-
toString
-