BEA Systems, Inc.

com.bea.logging
Class BaseLogRecord

java.lang.Object
  extended by java.util.logging.LogRecord
      extended by com.bea.logging.BaseLogRecord
All Implemented Interfaces:
BaseLogEntry, Serializable
Direct Known Subclasses:
WLLogRecord

public class BaseLogRecord
extends LogRecord
implements BaseLogEntry

Log record representing a catalog message

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.bea.logging.BaseLogEntry
DEFAULT_ID, DEFAULT_SUBSYSTEM
 
Constructor Summary
BaseLogRecord(int severity, String msg)
           
BaseLogRecord(int severity, String msg, Throwable throwable)
           
BaseLogRecord(LogMessage logMessage)
          Constructs a CELogRecord from a catalog message.
 
Method Summary
 void ensureFormattedDateInitialized(DateFormatter df)
          Formats the timestamp
 String getDiagnosticContextId()
          Gets the diagnostic context id associated with this log event.
 String getFormattedDate()
          Gets the formatted date string
 String getId()
          Gets the message id of this log entry
 String getLogMessage()
          Gets the message content of this log entry.
 String getMachineName()
          Gets the machine name on which this log entry was created
 String getServerName()
          Gets the server name on which this log entry was created
 int getSeverity()
          Gets the severity level for this message.
 String getSubsystem()
          Gets the name of the subsystem emitting this message
 String getThreadName()
          Gets the thread name in which this event was generated.
 ThrowableWrapper getThrowableWrapper()
          Gets the exception associated with this log event.
 long getTimestamp()
          Gets the timestamp when this message was created.
 String getTransactionId()
          Gets the JTA transaction id.
 String getUserId()
          Gets the user id who generated this log event.
 void setId(String messageId)
           
 void setLevel(Level level)
           
 void setLoggerName(String loggerName)
           
 void setThrowableWrapper(ThrowableWrapper throwableInfo)
          Sets the wrapper over the throwable associated with this message.
 void setThrown(Throwable th)
           
 
Methods inherited from class java.util.logging.LogRecord
getLevel, getLoggerName, getMessage, getMillis, getParameters, getResourceBundle, getResourceBundleName, getSequenceNumber, getSourceClassName, getSourceMethodName, getThreadID, getThrown, setMessage, setMillis, setParameters, setResourceBundle, setResourceBundleName, setSequenceNumber, setSourceClassName, setSourceMethodName, setThreadID
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.bea.logging.BaseLogEntry
setDiagnosticContextId, setMachineName, setServerName, setTransactionId, setUserId
 

Constructor Detail

BaseLogRecord

public BaseLogRecord(int severity,
                     String msg)

BaseLogRecord

public BaseLogRecord(int severity,
                     String msg,
                     Throwable throwable)

BaseLogRecord

public BaseLogRecord(LogMessage logMessage)
Constructs a CELogRecord from a catalog message.

Parameters:
catMsg -
Method Detail

getTimestamp

public long getTimestamp()
Description copied from interface: BaseLogEntry
Gets the timestamp when this message was created.

Specified by:
getTimestamp in interface BaseLogEntry
Returns:

getLogMessage

public String getLogMessage()
Description copied from interface: BaseLogEntry
Gets the message content of this log entry.

Specified by:
getLogMessage in interface BaseLogEntry
Returns:

ensureFormattedDateInitialized

public void ensureFormattedDateInitialized(DateFormatter df)
Formats the timestamp

Specified by:
ensureFormattedDateInitialized in interface BaseLogEntry
Parameters:
df -

getFormattedDate

public String getFormattedDate()
Gets the formatted date string

Specified by:
getFormattedDate in interface BaseLogEntry
Returns:

setThrown

public void setThrown(Throwable th)
Overrides:
setThrown in class LogRecord

getSeverity

public int getSeverity()
Description copied from interface: BaseLogEntry
Gets the severity level for this message.

Specified by:
getSeverity in interface BaseLogEntry
Returns:

getId

public String getId()
Description copied from interface: BaseLogEntry
Gets the message id of this log entry

Specified by:
getId in interface BaseLogEntry
Returns:

setId

public void setId(String messageId)

getSubsystem

public String getSubsystem()
Description copied from interface: BaseLogEntry
Gets the name of the subsystem emitting this message

Specified by:
getSubsystem in interface BaseLogEntry
Returns:

getThrowableWrapper

public ThrowableWrapper getThrowableWrapper()
Description copied from interface: BaseLogEntry
Gets the exception associated with this log event.

Specified by:
getThrowableWrapper in interface BaseLogEntry

setThrowableWrapper

public void setThrowableWrapper(ThrowableWrapper throwableInfo)
Description copied from interface: BaseLogEntry
Sets the wrapper over the throwable associated with this message.

Specified by:
setThrowableWrapper in interface BaseLogEntry

getThreadName

public String getThreadName()
Description copied from interface: BaseLogEntry
Gets the thread name in which this event was generated.

Specified by:
getThreadName in interface BaseLogEntry
Returns:

getUserId

public String getUserId()
Description copied from interface: BaseLogEntry
Gets the user id who generated this log event.

Specified by:
getUserId in interface BaseLogEntry
Returns:

getTransactionId

public String getTransactionId()
Description copied from interface: BaseLogEntry
Gets the JTA transaction id.

Specified by:
getTransactionId in interface BaseLogEntry
Returns:

getServerName

public String getServerName()
Description copied from interface: BaseLogEntry
Gets the server name on which this log entry was created

Specified by:
getServerName in interface BaseLogEntry
Returns:

getDiagnosticContextId

public String getDiagnosticContextId()
Gets the diagnostic context id associated with this log event.

Specified by:
getDiagnosticContextId in interface BaseLogEntry

getMachineName

public String getMachineName()
Description copied from interface: BaseLogEntry
Gets the machine name on which this log entry was created

Specified by:
getMachineName in interface BaseLogEntry
Returns:

setLoggerName

public void setLoggerName(String loggerName)
Overrides:
setLoggerName in class LogRecord

setLevel

public void setLevel(Level level)
Overrides:
setLevel in class LogRecord

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs100
Copyright 2006 BEA Systems Inc.