org.eclipse.equinox.log.internal
Class ExtendedLogEntryImpl

java.lang.Object
  extended by org.eclipse.equinox.log.internal.ExtendedLogEntryImpl
All Implemented Interfaces:
ExtendedLogEntry, LogEntry

public class ExtendedLogEntryImpl
extends java.lang.Object
implements ExtendedLogEntry, LogEntry


Constructor Summary
ExtendedLogEntryImpl(Bundle bundle, java.lang.String loggerName, java.lang.Object contextObject, int level, java.lang.String message, java.lang.Throwable throwable)
           
 
Method Summary
 Bundle getBundle()
          Returns the bundle that created this LogEntry object.
 java.lang.Object getContext()
          Returns the context associated with this LogEntry object.
 java.lang.Throwable getException()
          Returns the exception object associated with this LogEntry object.
 int getLevel()
          Returns the severity level of this LogEntry object.
 java.lang.String getLoggerName()
          Returns the logger name associated with this LogEntry object.
 java.lang.String getMessage()
          Returns the human readable message associated with this LogEntry object.
 long getSequenceNumber()
          Returns the log sequence number associated with this LogEntry object.
 ServiceReference getServiceReference()
          Returns the ServiceReference object for the service associated with this LogEntry object.
 long getThreadId()
          Returns the thread id of the logging thread associated with this LogEntry object.
 java.lang.String getThreadName()
          Returns the thread name of the logging thread associated with this LogEntry object.
 long getTime()
          Returns the value of currentTimeMillis() at the time this LogEntry object was created.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExtendedLogEntryImpl

public ExtendedLogEntryImpl(Bundle bundle,
                            java.lang.String loggerName,
                            java.lang.Object contextObject,
                            int level,
                            java.lang.String message,
                            java.lang.Throwable throwable)
Method Detail

getLoggerName

public java.lang.String getLoggerName()
Description copied from interface: ExtendedLogEntry
Returns the logger name associated with this LogEntry object.

Specified by:
getLoggerName in interface ExtendedLogEntry
Returns:
String containing the logger name associated with this LogEntry object;null if no logger name is associated with this LogEntry object.

getSequenceNumber

public long getSequenceNumber()
Description copied from interface: ExtendedLogEntry
Returns the log sequence number associated with this LogEntry object.

Specified by:
getSequenceNumber in interface ExtendedLogEntry
Returns:
long containing the sequence number associated with this LogEntry object.

getThreadId

public long getThreadId()
Description copied from interface: ExtendedLogEntry
Returns the thread id of the logging thread associated with this LogEntry object.

Specified by:
getThreadId in interface ExtendedLogEntry
Returns:
long containing the thread id associated with this LogEntry object.

getThreadName

public java.lang.String getThreadName()
Description copied from interface: ExtendedLogEntry
Returns the thread name of the logging thread associated with this LogEntry object.

Specified by:
getThreadName in interface ExtendedLogEntry
Returns:
String containing the message associated with this LogEntry object.

getBundle

public Bundle getBundle()
Description copied from interface: LogEntry
Returns the bundle that created this LogEntry object.

Specified by:
getBundle in interface LogEntry
Returns:
The bundle that created this LogEntry object; null if no bundle is associated with this LogEntry object.

getException

public java.lang.Throwable getException()
Description copied from interface: LogEntry
Returns the exception object associated with this LogEntry object.

In some implementations, the returned exception may not be the original exception. To avoid references to a bundle defined exception class, thus preventing an uninstalled bundle from being garbage collected, the Log Service may return an exception object of an implementation defined Throwable subclass. The returned object will attempt to provide as much information as possible from the original exception object such as the message and stack trace.

Specified by:
getException in interface LogEntry
Returns:
Throwable object of the exception associated with this LogEntry;null if no exception is associated with this LogEntry object.

getLevel

public int getLevel()
Description copied from interface: LogEntry
Returns the severity level of this LogEntry object.

This is one of the severity levels defined by the LogService interface.

Specified by:
getLevel in interface LogEntry
Returns:
Severity level of this LogEntry object.
See Also:
LogService.LOG_ERROR, LogService.LOG_WARNING, LogService.LOG_INFO, LogService.LOG_DEBUG

getMessage

public java.lang.String getMessage()
Description copied from interface: LogEntry
Returns the human readable message associated with this LogEntry object.

Specified by:
getMessage in interface LogEntry
Returns:
String containing the message associated with this LogEntry object.

getServiceReference

public ServiceReference getServiceReference()
Description copied from interface: LogEntry
Returns the ServiceReference object for the service associated with this LogEntry object.

Specified by:
getServiceReference in interface LogEntry
Returns:
ServiceReference object for the service associated with this LogEntry object; null if no ServiceReference object was provided.

getTime

public long getTime()
Description copied from interface: LogEntry
Returns the value of currentTimeMillis() at the time this LogEntry object was created.

Specified by:
getTime in interface LogEntry
Returns:
The system time in milliseconds when this LogEntry object was created.
See Also:
"System.currentTimeMillis()"

getContext

public java.lang.Object getContext()
Description copied from interface: ExtendedLogEntry
Returns the context associated with this LogEntry object.

Specified by:
getContext in interface ExtendedLogEntry
Returns:
Object containing the context associated with this LogEntry object;null if no context is associated with this LogEntry object.


Copyright © 2007-2012 FuseSource, Corp.. All Rights Reserved.