public class DefaultFormatter extends java.util.logging.Formatter implements ImplementationIF
The constructor is able to consume the following properties:
Property Keyword | Datatype | Default | Description |
---|---|---|---|
FORMAT | String | {0,date} {0,time}.{1,number,###} diff: {2,number,#####} Thread 0x{3} {6} {4} {5}{7} | The output format. |
LINEBRAK | String | space | The line break character before message, if exists. |
SEPARATOR | String | space | The message separator string. |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
DEFAULT_FORMAT_STRING |
static java.lang.String |
DEFAULT_LINEBREAK |
static java.lang.String |
DEFAULT_SEPARATOR |
Constructor and Description |
---|
DefaultFormatter()
Create the formatter.
|
DefaultFormatter(Transformer transformer,
java.util.Properties arguments)
Create the formatter.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
format(java.util.logging.LogRecord record)
Format the given LogRecord.
|
void |
setArguments(java.util.Properties arguments)
Set argument property map.
|
void |
setTransformer(Transformer transformer)
Set the transformer implementation.
|
public static final java.lang.String DEFAULT_FORMAT_STRING
public static final java.lang.String DEFAULT_LINEBREAK
public static final java.lang.String DEFAULT_SEPARATOR
public DefaultFormatter()
public DefaultFormatter(Transformer transformer, java.util.Properties arguments)
transformer
- the transformerarguments
- the argumentspublic void setTransformer(Transformer transformer)
setTransformer
in interface TransformerRequested
transformer
- The transformer.public void setArguments(java.util.Properties arguments)
setArguments
in interface PropertiesRequested
arguments
- the property mappublic java.lang.String format(java.util.logging.LogRecord record)
format
in class java.util.logging.Formatter
record
- the log record to be formatted.