@ProviderType public interface LogEntry
A LogEntry object may be acquired from the
LogReaderService.getLog method or by registering a
LogListener object.
| Modifier and Type | Method and Description |
|---|---|
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()
Deprecated.
Since 1.4. Replaced by
getLogLevel(). |
java.lang.StackTraceElement |
getLocation()
Returns the location information of the creation of this
LogEntry
object. |
java.lang.String |
getLoggerName()
Returns the name of the
Logger object used to create this
LogEntry object. |
LogLevel |
getLogLevel()
Returns the level of this
LogEntry object. |
java.lang.String |
getMessage()
Returns the formatted message associated with this
LogEntry
object. |
long |
getSequence()
Returns the sequence number for this
LogEntry object. |
ServiceReference<?> |
getServiceReference()
Returns the
ServiceReference object for the service associated
with this LogEntry object. |
java.lang.String |
getThreadInfo()
Returns a string representing the thread which created this
LogEntry object. |
long |
getTime()
Returns the value of
currentTimeMillis() at the time this
LogEntry object was created. |
Bundle getBundle()
LogEntry object.LogEntry object;
null if no bundle is associated with this
LogEntry object.ServiceReference<?> getServiceReference()
ServiceReference object for the service associated
with this LogEntry object.ServiceReference object for the service associated with
this LogEntry object; null if no
ServiceReference object was provided.@Deprecated int getLevel()
getLogLevel().LogEntry object.
If one of the log methods of LogService was used, this is
the specified integer level. Otherwise, this is the
ordinal value of the log
level.
LogEntry object.java.lang.String getMessage()
LogEntry
object.String containing the formatted message associated with
this LogEntry object.java.lang.Throwable getException()
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.
Throwable object of the exception associated with this
LogEntry;null if no exception is associated with
this LogEntry object.long getTime()
currentTimeMillis() at the time this
LogEntry object was created.LogEntry object
was created.LogLevel getLogLevel()
LogEntry object.LogEntry object.java.lang.String getLoggerName()
Logger object used to create this
LogEntry object.Logger object used to create this
LogEntry object.long getSequence()
LogEntry object.
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.
LogEntry object.java.lang.String getThreadInfo()
LogEntry object.
This string must contain the name of the thread and may contain other information about the thread.
LogEntry object.java.lang.StackTraceElement getLocation()
LogEntry
object.LogEntry
object.Copyright © OSGi Alliance (2000, 2018). All Rights Reserved. Licensed under the OSGi Specification License, Version 2.0