com.caucho.log
Class ELFormatter.ELFormatterLogRecord

java.lang.Object
  extended by com.caucho.log.ELFormatter.ELFormatterLogRecord
Enclosing class:
ELFormatter

public class ELFormatter.ELFormatterLogRecord
extends java.lang.Object

An api similar to java.util.logging.LogRecord that provides more complete information for logging purposes.


Constructor Summary
ELFormatter.ELFormatterLogRecord()
           
 
Method Summary
 java.util.logging.Level getLevel()
          The logging message level, for example Level.INFO.
 java.lang.String getLoggerName()
          The source Logger's name.
 java.lang.String getMessage()
          The "formatted" log message, after localization, substitution of parameters, and the inclusion of an exception stack trace if applicable.
 long getMillis()
          The time of the logging event, in milliseconds since 1970.
 java.lang.String getName()
          The source Logger's name.
 java.lang.Object[] getParameters()
           
 java.lang.String getRawMessage()
          The "raw" log message, before localization or substitution of parameters.
 java.util.ResourceBundle getResourceBundle()
          The resource bundle for localization.
 java.lang.String getResourceBundleName()
          The name of resource bundle for localization.
 long getSequenceNumber()
          The sequence number, normally assigned in the constructor of LogRecord.
 java.lang.String getShortName()
          The last component of the source Logger's name.
 java.lang.String getShortSourceClassName()
          The last component of the name (everthing after the last `.') of the class that issued the logging request.
 java.lang.String getSourceClassName()
          The name of the class that issued the logging request.
 java.lang.String getSourceMethodName()
          The name of the method that issued the logging request.
 int getThreadID()
          An identifier for the thread where the message originated.
 java.lang.Throwable getThrown()
          The throwable associated with the log record, if one was associated.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ELFormatter.ELFormatterLogRecord

public ELFormatter.ELFormatterLogRecord()
Method Detail

getMessage

public java.lang.String getMessage()
The "formatted" log message, after localization, substitution of parameters, and the inclusion of an exception stack trace if applicable.

During formatting, if the source logger has a localization ResourceBundle and if that ResourceBundle has an entry for this message string, then the message string is replaced with the localized value.

If the message has parameters, java.text.MessageFormat is used to format the message with the parameters.

If the log record has an associated exception, the stack trace is appended to the log message.

See Also:
MessageFormat, java.lang.Throwable.printStackTrace()

getName

public java.lang.String getName()
The source Logger's name.

Returns:
source logger name, which may be null

getLoggerName

public java.lang.String getLoggerName()
The source Logger's name.

Returns:
source logger name, which may be null

getShortName

public java.lang.String getShortName()
The last component of the source Logger's name. The last component is everything that occurs after the last `.' character, usually it is the class name.

Returns:
short version of the source logger name, or null

getLevel

public java.util.logging.Level getLevel()
The logging message level, for example Level.INFO.

See Also:
Level

getMillis

public long getMillis()
The time of the logging event, in milliseconds since 1970.


getThreadID

public int getThreadID()
An identifier for the thread where the message originated.


getThrown

public java.lang.Throwable getThrown()
The throwable associated with the log record, if one was associated.


getSequenceNumber

public long getSequenceNumber()
The sequence number, normally assigned in the constructor of LogRecord.


getSourceClassName

public java.lang.String getSourceClassName()
The name of the class that issued the logging request. This name may be unavailable, or not actually the name of the class that issued the logging message.


getShortSourceClassName

public java.lang.String getShortSourceClassName()
The last component of the name (everthing after the last `.') of the class that issued the logging request. This name may be unavailable, or not actually the name of the class that issued the logging message.

Returns:
short version of the sourceClassName

getSourceMethodName

public java.lang.String getSourceMethodName()
The name of the method that issued the logging request. This name may be unavailable, or not actually the name of the class that issued the logging message.


getRawMessage

public java.lang.String getRawMessage()
The "raw" log message, before localization or substitution of parameters.

This returned message will be either the final text, text containing parameter substitution "format elements" (like `{0}') for use by java.text.MessageFormat, or a localization key.

See Also:
MessageFormat

getResourceBundle

public java.util.ResourceBundle getResourceBundle()
The resource bundle for localization.


getResourceBundleName

public java.lang.String getResourceBundleName()
The name of resource bundle for localization.


getParameters

public java.lang.Object[] getParameters()