|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.osgi.util.tracker.ServiceTracker
org.apache.felix.useradmin.impl.Logger
public class Logger
This Logger class represents ServiceTracker for LogService. It provides methods for logging messages. If LogServic is not available it logs to stdout.
LogService
,
ServiceTracker
Field Summary |
---|
Fields inherited from class org.osgi.util.tracker.ServiceTracker |
---|
context, filter |
Fields inherited from interface org.osgi.service.log.LogService |
---|
LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_WARNING |
Constructor Summary | |
---|---|
Logger(BundleContext context)
Constructs new Logger(ServiceTracker for LogService). |
Method Summary | |
---|---|
void |
log(int level,
String message)
Logs a message. |
void |
log(int level,
String message,
Throwable exception)
Logs a message with an exception. |
void |
log(ServiceReference ref,
int level,
String message)
Logs a message associated with a specific ServiceReference
object. |
void |
log(ServiceReference ref,
int level,
String message,
Throwable exception)
Logs a message with an exception associated and a ServiceReference object. |
Methods inherited from class org.osgi.util.tracker.ServiceTracker |
---|
addingService, close, getService, getService, getServiceReference, getServiceReferences, getServices, getTrackingCount, modifiedService, open, open, remove, removedService, size, waitForService |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Logger(BundleContext context)
context
- bundle context.Method Detail |
---|
public void log(int level, String message)
LogService
The ServiceReference
field and the Throwable
field
of the LogEntry
object will be set to null
.
log
in interface LogService
level
- The severity of the message. This should be one of the
defined log levels but may be any integer that is interpreted in a
user defined way.message
- Human readable string describing the condition or
null
.LogService.log(int, java.lang.String)
public void log(int level, String message, Throwable exception)
LogService
The ServiceReference
field of the LogEntry
object
will be set to null
.
log
in interface LogService
level
- The severity of the message. This should be one of the
defined log levels but may be any integer that is interpreted in a
user defined way.message
- The human readable string describing the condition or
null
.exception
- The exception that reflects the condition or
null
.LogService.log(int, java.lang.String, java.lang.Throwable)
public void log(ServiceReference ref, int level, String message)
LogService
ServiceReference
object.
The Throwable
field of the LogEntry
will be set to
null
.
log
in interface LogService
ref
- The ServiceReference
object of the service that this
message is associated with or null
.level
- The severity of the message. This should be one of the
defined log levels but may be any integer that is interpreted in a
user defined way.message
- Human readable string describing the condition or
null
.LogService.log(org.osgi.framework.ServiceReference, int, java.lang.String)
public void log(ServiceReference ref, int level, String message, Throwable exception)
LogService
ServiceReference
object.
log
in interface LogService
ref
- The ServiceReference
object of the service that this
message is associated with.level
- The severity of the message. This should be one of the
defined log levels but may be any integer that is interpreted in a
user defined way.message
- Human readable string describing the condition or
null
.exception
- The exception that reflects the condition or
null
.LogService.log(org.osgi.framework.ServiceReference, int, java.lang.String,
java.lang.Throwable)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |