public class XRSimpleLogFormatter extends Formatter
| Constructor and Description |
|---|
XRSimpleLogFormatter() |
XRSimpleLogFormatter(String msgFmt,
String throwableMsgFmt)
Create a custom log formatter for use with:
JDKXRLogger(boolean, Level, Handler, Formatter)
Options:
{0} String.valueOf(record.getMillis()),
{1} record.getLoggerName(),
{2} record.getLevel().toString(),
{3} record.getSourceClassName(),
{4} record.getSourceMethodName(),
{5} record.getMessage()
{6} record.getThrown().getName()
{7} record.getThrown().getMessage()
{8} record.getThrown() stack trace
Example (msgFmt): {1} {2}:: {5}\nExample (throwableMsgFmt): {1} {2}:: {5} => {6}:: {7}\n |
| Modifier and Type | Method and Description |
|---|---|
String |
format(LogRecord record)
Format the given log record and return the formatted string.
|
String |
formatMessage(LogRecord record)
Localize and format the message string from a log record.
|
String |
getHead(Handler h)
Return the header string for a set of formatted records.
|
String |
getTail(Handler h)
Return the tail string for a set of formatted records.
|
public XRSimpleLogFormatter()
public XRSimpleLogFormatter(String msgFmt, String throwableMsgFmt)
JDKXRLogger(boolean, Level, Handler, Formatter)
Options:
{1} {2}:: {5}\n{1} {2}:: {5} => {6}:: {7}\npublic String format(LogRecord record)
public String formatMessage(LogRecord record)
formatMessage in class FormatterCopyright © 2004–2025. All rights reserved.