Class ODLLogFormatter
- java.lang.Object
-
- java.util.logging.Formatter
-
- com.sun.enterprise.server.logging.CommonFormatter
-
- com.sun.enterprise.server.logging.AnsiColorFormatter
-
- com.sun.enterprise.server.logging.ODLLogFormatter
-
- All Implemented Interfaces:
LogEventBroadcaster
public class ODLLogFormatter extends AnsiColorFormatter implements LogEventBroadcaster
ODLLogFormatter conforms to the logging format defined by the Log Working Group in Oracle. The specified format is "[[timestamp] [organization ID] [Message Type/Level] [Message ID] [Logger Name] [Thread ID] [Extra Attributes] [Message]]\n"- Author:
- Naman Mehta
-
-
Constructor Summary
Constructors Constructor Description ODLLogFormatter()
ODLLogFormatter(FormatterDelegate delegate, String excludeFields)
ODLLogFormatter(String excludeFields)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
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)
-
Methods inherited from class com.sun.enterprise.server.logging.AnsiColorFormatter
color, getColor, getLoggerColor, getReset, noAnsi
-
Methods inherited from class com.sun.enterprise.server.logging.CommonFormatter
getProductId, isFieldExcluded
-
-
-
-
Constructor Detail
-
ODLLogFormatter
public ODLLogFormatter()
-
ODLLogFormatter
public ODLLogFormatter(String excludeFields)
-
ODLLogFormatter
public ODLLogFormatter(FormatterDelegate delegate, String excludeFields)
-
-
Method Detail
-
setDelegate
public void setDelegate(FormatterDelegate delegate)
-
format
public 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.
-
formatMessage
public String formatMessage(LogRecord record)
- Overrides:
formatMessage
in classFormatter
-
getRecordFieldSeparator
public String getRecordFieldSeparator()
-
setRecordFieldSeparator
public void setRecordFieldSeparator(String recordFieldSeparator)
-
getRecordDateFormat
public String getRecordDateFormat()
-
setRecordDateFormat
public void setRecordDateFormat(String recordDateFormat)
-
informLogEventListeners
public void informLogEventListeners(LogEvent logEvent)
Description copied from interface:LogEventBroadcaster
Broadcast the log event to registered listeners.- Specified by:
informLogEventListeners
in interfaceLogEventBroadcaster
-
-