@Service
@ContractsProvided(value={UniformLogFormatter.class,java.util.logging.Formatter.class})
@PerLookup
public class UniformLogFormatter
extends AnsiColorFormatter
implements LogEventBroadcaster
| Modifier and Type | Field and Description |
|---|---|
static char |
NV_SEPARATOR |
static char |
NVPAIR_SEPARATOR |
| Constructor and Description |
|---|
UniformLogFormatter() |
UniformLogFormatter(FormatterDelegate delegate) |
| Modifier and Type | Method and Description |
|---|---|
String |
format(LogRecord record)
_REVISIT_: Replace the String Array with an HashMap and do some
benchmark to determine whether StringCat is faster or Hashlookup for
the template is faster.
|
String |
formatMessage(LogRecord record) |
protected void |
getNameValuePairs(StringBuilder buf,
LogRecord record)
Sun One Appserver SE/EE? can override to specify their product specific
key value pairs.
|
protected String |
getProductId()
GlassFish can override to specify their product version
|
String |
getRecordBeginMarker() |
String |
getRecordDateFormat() |
String |
getRecordEndMarker() |
String |
getRecordFieldSeparator() |
void |
informLogEventListeners(LogEvent logEvent)
Broadcast the log event to registered listeners.
|
void |
setDelegate(FormatterDelegate delegate) |
void |
setRecordBeginMarker(String recordBeginMarker) |
void |
setRecordDateFormat(String recordDateFormat) |
void |
setRecordEndMarker(String recordEndMarker) |
void |
setRecordFieldSeparator(String recordFieldSeparator) |
color, getColor, getLoggerColor, getReset, noAnsipublic static final char NVPAIR_SEPARATOR
public static final char NV_SEPARATOR
public UniformLogFormatter()
public UniformLogFormatter(FormatterDelegate delegate)
public void setDelegate(FormatterDelegate delegate)
public String format(LogRecord record)
public String formatMessage(LogRecord record)
formatMessage in class Formatterprotected String getProductId()
protected void getNameValuePairs(StringBuilder buf, LogRecord record)
public String getRecordBeginMarker()
public void setRecordBeginMarker(String recordBeginMarker)
public String getRecordEndMarker()
public void setRecordEndMarker(String recordEndMarker)
public String getRecordFieldSeparator()
public void setRecordFieldSeparator(String recordFieldSeparator)
public String getRecordDateFormat()
public void setRecordDateFormat(String recordDateFormat)
public void informLogEventListeners(LogEvent logEvent)
LogEventBroadcasterinformLogEventListeners in interface LogEventBroadcasterCopyright © 2017. All rights reserved.