Constructor and Description |
---|
LogEntryImpl(org.osgi.framework.Bundle bundle,
org.osgi.framework.ServiceReference service,
int level,
String message,
Throwable exception) |
Modifier and Type | Method and Description |
---|---|
org.osgi.framework.Bundle |
getBundle()
Returns the bundle that created this
LogEntry object. |
Throwable |
getException()
Returns the exception object associated with this
LogEntry
object. |
int |
getLevel()
Returns the severity level of this
LogEntry object. |
String |
getMessage()
Returns the human readable message associated with this
LogEntry
object. |
org.osgi.framework.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. |
public org.osgi.framework.Bundle getBundle()
LogEntry
LogEntry
object.public org.osgi.framework.ServiceReference getServiceReference()
LogEntry
ServiceReference
object for the service associated
with this LogEntry
object.getServiceReference
in interface LogEntry
ServiceReference
object for the service associated
with this LogEntry
object; null
if no
ServiceReference
object was provided.public int getLevel()
LogEntry
LogEntry
object.
This is one of the severity levels defined by the LogService
interface.
getLevel
in interface LogEntry
LogEntry
object.LogService.LOG_ERROR
,
LogService.LOG_WARNING
,
LogService.LOG_INFO
,
LogService.LOG_DEBUG
public String getMessage()
LogEntry
LogEntry
object.getMessage
in interface LogEntry
String
containing the message associated with this
LogEntry
object.public Throwable getException()
LogEntry
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.
getException
in interface LogEntry
Throwable
object of the exception associated with this
LogEntry
;null
if no exception is
associated with this LogEntry
object.public long getTime()
LogEntry
currentTimeMillis()
at the time this
LogEntry
object was created.Copyright © 2019. All rights reserved.