public class ExtendedLogEntryImpl extends Object implements ExtendedLogEntry, LogEntry
Constructor and Description |
---|
ExtendedLogEntryImpl(Bundle bundle,
String loggerName,
Object contextObject,
int level,
String message,
Throwable throwable) |
Modifier and Type | Method and Description |
---|---|
Bundle |
getBundle()
Returns the bundle that created this
LogEntry object. |
Object |
getContext()
Returns the context associated with 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 |
getLoggerName()
Returns the logger name associated with this
LogEntry
object. |
String |
getMessage()
Returns the human readable message associated with this
LogEntry
object. |
long |
getSequenceNumber()
Returns the log sequence number associated with this
LogEntry
object. |
ServiceReference |
getServiceReference()
Returns the
ServiceReference object for the service associated
with this LogEntry object. |
long |
getThreadId()
Returns the thread id of the logging thread associated with this
LogEntry
object. |
String |
getThreadName()
Returns the thread name of the logging thread associated with this
LogEntry
object. |
long |
getTime()
Returns the value of
currentTimeMillis() at the time this
LogEntry object was created. |
public String getLoggerName()
ExtendedLogEntry
LogEntry
object.getLoggerName
in interface ExtendedLogEntry
String
containing the logger name associated with this
LogEntry
object;null
if no logger name is
associated with this LogEntry
object.public long getSequenceNumber()
ExtendedLogEntry
LogEntry
object.getSequenceNumber
in interface ExtendedLogEntry
long
containing the sequence number associated with this
LogEntry
object.public long getThreadId()
ExtendedLogEntry
LogEntry
object.getThreadId
in interface ExtendedLogEntry
long
containing the thread id associated with this
LogEntry
object.public String getThreadName()
ExtendedLogEntry
LogEntry
object.getThreadName
in interface ExtendedLogEntry
String
containing the message associated with this
LogEntry
object.public Bundle getBundle()
LogEntry
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 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 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 long getTime()
LogEntry
currentTimeMillis()
at the time this
LogEntry
object was created.public Object getContext()
ExtendedLogEntry
LogEntry
object.getContext
in interface ExtendedLogEntry
Object
containing the context associated with this
LogEntry
object;null
if no context is
associated with this LogEntry
object.Copyright © 2007–2018 The Apache Software Foundation. All rights reserved.