Package org.sosy_lab.common.log
Class ConsoleLogFormatter
- java.lang.Object
-
- java.util.logging.Formatter
-
- org.sosy_lab.common.log.ConsoleLogFormatter
-
public class ConsoleLogFormatter extends Formatter
Class to handle formatting for console output.
-
-
Constructor Summary
Constructors Constructor Description ConsoleLogFormatter(LoggingOptions options)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
format(LogRecord lr)
protected void
format(LogRecord lr, StringBuilder sb)
FormatsLogRecord
using the providedStringBuilder
.
This method corresponds toFormatter.format(LogRecord)
in a template method pattern.String
toString()
static Formatter
withColorsIfPossible()
static Formatter
withoutColors()
-
Methods inherited from class java.util.logging.Formatter
formatMessage, getHead, getTail
-
-
-
-
Constructor Detail
-
ConsoleLogFormatter
public ConsoleLogFormatter(LoggingOptions options)
-
-
Method Detail
-
withoutColors
public static Formatter withoutColors()
-
withColorsIfPossible
public static Formatter withColorsIfPossible()
-
format
protected void format(LogRecord lr, StringBuilder sb)
FormatsLogRecord
using the providedStringBuilder
.
This method corresponds toFormatter.format(LogRecord)
in a template method pattern. The coloring behaviour is provided by superclass.- Parameters:
lr
- theLogRecord
to format.sb
- theStringBuilder
forLogRecord
formatting.- See Also:
Formatter.format(LogRecord)
-
-