Package org.osgi.service.log
Interface LogEntry
public interface LogEntry
Provides methods to access the information contained in an individual Log
Service log entry.
A LogEntry object may be acquired from the
LogReaderService.getLog method or by registering a
LogListener object.
- Version:
- $Revision: 5654 $
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionorg.osgi.framework.BundleReturns the bundle that created thisLogEntryobject.Returns the exception object associated with thisLogEntryobject.intgetLevel()Returns the severity level of thisLogEntryobject.Returns the human readable message associated with thisLogEntryobject.org.osgi.framework.ServiceReferenceReturns theServiceReferenceobject for the service associated with thisLogEntryobject.longgetTime()Returns the value ofcurrentTimeMillis()at the time thisLogEntryobject was created.
-
Method Details
-
getBundle
org.osgi.framework.Bundle getBundle()Returns the bundle that created thisLogEntryobject.- Returns:
- The bundle that created this
LogEntryobject;nullif no bundle is associated with thisLogEntryobject.
-
getServiceReference
org.osgi.framework.ServiceReference getServiceReference()Returns theServiceReferenceobject for the service associated with thisLogEntryobject.- Returns:
ServiceReferenceobject for the service associated with thisLogEntryobject;nullif noServiceReferenceobject was provided.
-
getLevel
int getLevel()Returns the severity level of thisLogEntryobject.This is one of the severity levels defined by the
LogServiceinterface.- Returns:
- Severity level of this
LogEntryobject. - See Also:
-
getMessage
String getMessage()Returns the human readable message associated with thisLogEntryobject.- Returns:
Stringcontaining the message associated with thisLogEntryobject.
-
getException
Throwable getException()Returns the exception object associated with thisLogEntryobject.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.
- Returns:
Throwableobject of the exception associated with thisLogEntry;nullif no exception is associated with thisLogEntryobject.
-
getTime
long getTime()Returns the value ofcurrentTimeMillis()at the time thisLogEntryobject was created.- Returns:
- The system time in milliseconds when this
LogEntryobject was created. - See Also:
-