Package org.jboss.logmanager
Class ExtFormatter
- java.lang.Object
-
- java.util.logging.Formatter
-
- org.jboss.logmanager.ExtFormatter
-
- Direct Known Subclasses:
MultistepFormatter,StructuredFormatter
public abstract class ExtFormatter extends Formatter
A formatter which handlesExtLogRecordinstances.
-
-
Constructor Summary
Constructors Constructor Description ExtFormatter()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description Stringformat(LogRecord record)abstract Stringformat(ExtLogRecord record)Format a message using an extended log record.StringformatMessage(LogRecord record)protected StringformatMessageLegacy(LogRecord record)Format the message text as if there are no parameters.protected StringformatMessageNone(LogRecord record)Format the message text as if there are no parameters.protected StringformatMessagePrintf(LogRecord record)Format the message text as if there are no parameters.booleanisCallerCalculationRequired()Determines whether or not this formatter will require caller, source level, information when a log record is formatted.
-
-
-
Method Detail
-
format
public abstract String format(ExtLogRecord record)
Format a message using an extended log record.- Parameters:
record- the log record- Returns:
- the formatted message
-
formatMessage
public String formatMessage(LogRecord record)
- Overrides:
formatMessagein classFormatter
-
isCallerCalculationRequired
public boolean isCallerCalculationRequired()
Determines whether or not this formatter will require caller, source level, information when a log record is formatted.- Returns:
trueif the formatter will need caller information, otherwisefalse- See Also:
LogRecord.getSourceClassName(),ExtLogRecord.getSourceFileName(),ExtLogRecord.getSourceLineNumber(),LogRecord.getSourceMethodName()
-
formatMessageNone
protected String formatMessageNone(LogRecord record)
Format the message text as if there are no parameters. The default implementation delegates torecord.getMessage().- Parameters:
record- the record to format- Returns:
- the formatted string
-
formatMessageLegacy
protected String formatMessageLegacy(LogRecord record)
Format the message text as if there are no parameters. The default implementation delegates toMessageFormat.format(record.getMessage(),record.getParameters()).- Parameters:
record- the record to format- Returns:
- the formatted string
-
formatMessagePrintf
protected String formatMessagePrintf(LogRecord record)
Format the message text as if there are no parameters. The default implementation delegates toString.format(record.getMessage(),record.getParameters()).- Parameters:
record- the record to format- Returns:
- the formatted string
-
-