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
A formatter which formats a record in a series of steps.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate int
private static final FormatStep[]
private FormatStep[]
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct a new instance.MultistepFormatter
(FormatStep[] steps) Construct a new instance. -
Method Summary
Modifier and TypeMethodDescriptionprivate void
format
(ExtLogRecord record) Format a message using an extended log record.getSteps()
Get a copy of the format steps.void
setSteps
(FormatStep[] steps) Assign new format steps.Methods inherited from class org.jboss.logmanager.ExtFormatter
format
Methods inherited from class java.util.logging.Formatter
formatMessage, getHead, getTail
-
Field Details
-
steps
-
builderLength
private volatile int builderLength -
EMPTY_STEPS
-
-
Constructor Details
-
MultistepFormatter
Construct a new instance.- Parameters:
steps
- the steps to execute to format the record
-
MultistepFormatter
public MultistepFormatter()Construct a new instance.
-
-
Method Details
-
calculateBuilderLength
private void calculateBuilderLength() -
getSteps
Get a copy of the format steps.- Returns:
- a copy of the format steps
-
setSteps
Assign new format steps.- Parameters:
steps
- the new format steps
-
format
Format a message using an extended log record.- Specified by:
format
in classExtFormatter
- Parameters:
record
- the log record- Returns:
- the formatted message
-