OSGi™ Service Platform
Release 2

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.

See Also:
LogReaderService.getLog(), LogListener

Method Summary
 Bundle getBundle()
          Returns the bundle that created 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 getMessage()
          Returns the human readable message associated with this LogEntry object.
 ServiceReference getServiceReference()
          Returns the ServiceReference object for the service associated with this LogEntry object.
 long getTime()
          Returns the value of currentTimeMillis() at the time this LogEntry object was created.
 

Method Detail

getBundle

public Bundle getBundle()
Returns the bundle that created this LogEntry object.

Returns:
The bundle that created this LogEntry object; null if no bundle is associated with this LogEntry object.

getServiceReference

public ServiceReference getServiceReference()
Returns the ServiceReference object for the service associated with this LogEntry object.

Returns:
ServiceReference object for the service associated with this LogEntry object; null if no ServiceReference object was provided.

getLevel

public int getLevel()
Returns the severity level of this LogEntry object.

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

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()
Returns the human readable message associated with this LogEntry object.

Returns:
String containing the message associated with this LogEntry object.

getException

public java.lang.Throwable getException()
Returns the exception object associated with this LogEntry object.

Returns:
Throwable object of the exception associated with this LogEntry; null if no exception is associated with this LogEntry objcet.

getTime

public long getTime()
Returns the value of currentTimeMillis() at the time this LogEntry object was created.

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

OSGi™ Service Platform
Release 2

Copyright © OSGi Alliance (2000, 2002). All Rights Reserved. Licensed under the OSGi Specification License, Version 1.0