Interface LogEntry
- 
 @ProviderType public interface LogEntryProvides methods to access the information contained in an individual Log Service log entry.A LogEntryobject may be acquired from theLogReaderService.getLogmethod or by registering aLogListenerobject.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description org.osgi.framework.BundlegetBundle()Returns the bundle that created thisLogEntryobject.java.lang.ThrowablegetException()Returns the exception object associated with thisLogEntryobject.intgetLevel()Deprecated.Since 1.4.default java.lang.StackTraceElementgetLocation()Returns the location information of the creation of thisLogEntryobject.default java.lang.StringgetLoggerName()Returns the name of theLoggerobject used to create thisLogEntryobject.default LogLevelgetLogLevel()Returns the level of thisLogEntryobject.java.lang.StringgetMessage()Returns the formatted message associated with thisLogEntryobject.default longgetSequence()Returns the sequence number for thisLogEntryobject.org.osgi.framework.ServiceReference<?>getServiceReference()Returns theServiceReferenceobject for the service associated with thisLogEntryobject.default java.lang.StringgetThreadInfo()Returns a string representing the thread which created thisLogEntryobject.longgetTime()Returns the value ofcurrentTimeMillis()at the time thisLogEntryobject was created.
 
- 
- 
- 
Method Detail- 
getBundleorg.osgi.framework.Bundle getBundle() Returns the bundle that created thisLogEntryobject.- Returns:
- The bundle that created this LogEntryobject;nullif no bundle is associated with thisLogEntryobject.
 
 - 
getServiceReferenceorg.osgi.framework.ServiceReference<?> getServiceReference() Returns theServiceReferenceobject for the service associated with thisLogEntryobject.- Returns:
- ServiceReferenceobject for the service associated with this- LogEntryobject;- nullif no- ServiceReferenceobject was provided.
 
 - 
getLevel@Deprecated int getLevel() Deprecated.Since 1.4. Replaced bygetLogLevel().Returns the integer level of thisLogEntryobject.If one of the logmethods ofLogServicewas used, this is the specified integer level. Otherwise, this is theordinalvalue of thelog level.- Returns:
- Integer level of this LogEntryobject.
 
 - 
getMessagejava.lang.String getMessage() Returns the formatted message associated with thisLogEntryobject.- Returns:
- Stringcontaining the formatted message associated with this- LogEntryobject.
 
 - 
getExceptionjava.lang.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 this- LogEntry;- nullif no exception is associated with this- LogEntryobject.
 
 - 
getTimelong getTime() Returns the value ofcurrentTimeMillis()at the time thisLogEntryobject was created.- Returns:
- The system time in milliseconds when this LogEntryobject was created.
- See Also:
- "System.currentTimeMillis()"
 
 - 
getLogLeveldefault LogLevel getLogLevel() Returns the level of thisLogEntryobject.- Returns:
- The level of this LogEntryobject.
- Since:
- 1.4
 
 - 
getLoggerNamedefault java.lang.String getLoggerName() Returns the name of theLoggerobject used to create thisLogEntryobject.- Returns:
- The name of the Loggerobject used to create thisLogEntryobject.
- Since:
- 1.4
 
 - 
getSequencedefault long getSequence() Returns the sequence number for thisLogEntryobject.A unique, non-negative value that is larger than all previously assigned values since the log implementation was started. These values are transient and are reused upon restart of the log implementation. - Returns:
- The sequence number for this LogEntryobject.
- Since:
- 1.4
 
 - 
getThreadInfodefault java.lang.String getThreadInfo() Returns a string representing the thread which created thisLogEntryobject.This string must contain the name of the thread and may contain other information about the thread. - Returns:
- A string representing the thread which created this
         LogEntryobject.
- Since:
- 1.4
 
 - 
getLocationdefault java.lang.StackTraceElement getLocation() Returns the location information of the creation of thisLogEntryobject.- Returns:
- The location information of the creation of this LogEntryobject.
- Since:
- 1.4
 
 
- 
 
-