Class TextFormatter
- java.lang.Object
-
- java.util.logging.Formatter
-
- org.apache.jena.atlas.logging.java.TextFormatter
-
public class TextFormatter extends java.util.logging.FormatterA pattern-driven log formatter. Inspired by Log4j's PatternLayout Set a different output pattern with.format.The default format is
"%5$tT %3$-5s %2$-20s :: %6$s\n".Examples:
- "%5$tT.%5$tL %3$-5s %2$-20s :: %6$s\n" for milliseconds.
- "%tF %5$tT.%5$tL %3$-5s %2$-20s :: %6$s\n" for date
The log message formatting call is:
String.format(format, loggerName, // 1 loggerNameShort, // 2 levelOutputName, // 3 Thread.currentThread().getName(), // 4 new Date(record.getMillis()), // 5 formatted$) ; // 6whereformatted$is theLogRecordmessage string after parameters have been processed.
-
-
Constructor Summary
Constructors Constructor Description TextFormatter()TextFormatter(java.lang.String fmt)programmatic setup - provide the format
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Stringformat(java.util.logging.LogRecord record)
-