Package org.jboss.logmanager.formatters
Class MultistepFormatter
- java.lang.Object
-
- java.util.logging.Formatter
-
- org.jboss.logmanager.ExtFormatter
-
- org.jboss.logmanager.formatters.MultistepFormatter
-
- Direct Known Subclasses:
PatternFormatter
public class MultistepFormatter extends ExtFormatter
A formatter which formats a record in a series of steps.
-
-
Constructor Summary
Constructors Constructor Description MultistepFormatter()Construct a new instance.MultistepFormatter(FormatStep[] steps)Construct a new instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Stringformat(ExtLogRecord record)Format a message using an extended log record.FormatStep[]getSteps()Get a copy of the format steps.booleanisCallerCalculationRequired()Determines whether or not this formatter will require caller, source level, information when a log record is formatted.voidsetSteps(FormatStep[] steps)Assign new format steps.-
Methods inherited from class org.jboss.logmanager.ExtFormatter
format, formatMessage, formatMessageLegacy, formatMessageNone, formatMessagePrintf
-
-
-
-
Constructor Detail
-
MultistepFormatter
public MultistepFormatter(FormatStep[] steps)
Construct a new instance.- Parameters:
steps- the steps to execute to format the record
-
MultistepFormatter
public MultistepFormatter()
Construct a new instance.
-
-
Method Detail
-
getSteps
public FormatStep[] getSteps()
Get a copy of the format steps.- Returns:
- a copy of the format steps
-
setSteps
public void setSteps(FormatStep[] steps)
Assign new format steps.- Parameters:
steps- the new format steps
-
format
public String format(ExtLogRecord record)
Format a message using an extended log record.- Specified by:
formatin classExtFormatter- Parameters:
record- the log record- Returns:
- the formatted message
-
isCallerCalculationRequired
public boolean isCallerCalculationRequired()
Description copied from class:ExtFormatterDetermines whether or not this formatter will require caller, source level, information when a log record is formatted.- Overrides:
isCallerCalculationRequiredin classExtFormatter- Returns:
trueif the formatter will need caller information, otherwisefalse- See Also:
LogRecord.getSourceClassName(),ExtLogRecord.getSourceFileName(),ExtLogRecord.getSourceLineNumber(),LogRecord.getSourceMethodName()
-
-