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 Stringformat(LogRecord lr)protected voidformat(LogRecord lr, StringBuilder sb)FormatsLogRecordusing the providedStringBuilder.
This method corresponds toFormatter.format(LogRecord)in a template method pattern.StringtoString()static FormatterwithColorsIfPossible()static FormatterwithoutColors()-
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)
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:
Formatter.format(LogRecord)
-
-