@Service @ContractsProvided(value={ODLLogFormatter.class,java.util.logging.Formatter.class}) @PerLookup public class ODLLogFormatter extends AnsiColorFormatter implements LogEventBroadcaster
Constructor and Description |
---|
ODLLogFormatter() |
ODLLogFormatter(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) |
String |
getMessageWithoutMessageID(String message) |
protected String |
getProductId()
GlassFish can override to specify their product version
|
String |
getRecordDateFormat() |
String |
getRecordFieldSeparator() |
void |
informLogEventListeners(LogEvent logEvent)
Broadcast the log event to registered listeners.
|
void |
setDelegate(FormatterDelegate delegate) |
void |
setRecordDateFormat(String recordDateFormat) |
void |
setRecordFieldSeparator(String recordFieldSeparator) |
color, getColor, getLoggerColor, getReset, noAnsi
public ODLLogFormatter()
public ODLLogFormatter(FormatterDelegate delegate)
public void setDelegate(FormatterDelegate delegate)
public String format(LogRecord record)
public String formatMessage(LogRecord record)
formatMessage
in class Formatter
protected String getProductId()
public String getRecordFieldSeparator()
public void setRecordFieldSeparator(String recordFieldSeparator)
public String getRecordDateFormat()
public void setRecordDateFormat(String recordDateFormat)
public void informLogEventListeners(LogEvent logEvent)
LogEventBroadcaster
informLogEventListeners
in interface LogEventBroadcaster
Copyright © 2018. All rights reserved.