public static class ConsoleLogger.LogEntryImpl extends java.lang.Object implements LogEntry
| Modifier and Type | Field and Description |
|---|---|
Bundle |
bundle |
java.lang.Throwable |
exception |
int |
level |
java.lang.String |
message |
ServiceReference<?> |
reference |
long |
time |
| Constructor and Description |
|---|
LogEntryImpl(Bundle b,
ServiceReference<?> reference,
java.lang.Throwable e,
int level,
java.lang.String message) |
| 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()
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. |
public final Bundle bundle
public final ServiceReference<?> reference
public final java.lang.Throwable exception
public final java.lang.String message
public final int level
public final long time
public LogEntryImpl(Bundle b, ServiceReference<?> reference, java.lang.Throwable e, int level, java.lang.String message)
public Bundle getBundle()
LogEntryLogEntry object.public ServiceReference getServiceReference()
LogEntryServiceReference object for the service associated
with this LogEntry object.getServiceReference in interface LogEntryServiceReference object for the service associated with
this LogEntry object; null if no
ServiceReference object was provided.public int getLevel()
LogEntryLogEntry object.
This is one of the severity levels defined by the LogService
interface.
getLevel in interface LogEntryLogEntry object.LogService.LOG_ERROR,
LogService.LOG_WARNING,
LogService.LOG_INFO,
LogService.LOG_DEBUGpublic java.lang.String getMessage()
LogEntryLogEntry
object.getMessage in interface LogEntryString containing the message associated with this
LogEntry object.public java.lang.Throwable getException()
LogEntryLogEntry
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 LogEntryThrowable object of the exception associated with this
LogEntry;null if no exception is associated with
this LogEntry object.public long getTime()
LogEntrycurrentTimeMillis() at the time this
LogEntry object was created.Copyright (c) aQute SARL (2000, 2019) and others. All Rights Reserved.