public class LogServiceEnabledLogger extends Object
Modifier and Type | Field and Description |
---|---|
protected org.osgi.util.tracker.ServiceTracker<Object,Object> |
logServiceTracker |
protected int |
trackingCount |
Constructor and Description |
---|
LogServiceEnabledLogger(org.osgi.framework.BundleContext bundleContext) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the logger
|
void |
log(int level,
String message,
Throwable ex)
Method to actually emit the log message.
|
protected final org.osgi.util.tracker.ServiceTracker<Object,Object> logServiceTracker
protected volatile int trackingCount
public LogServiceEnabledLogger(org.osgi.framework.BundleContext bundleContext)
public void close()
public void log(int level, String message, Throwable ex)
level
- The log level of the messages. This corresponds to the log
levels defined by the OSGi LogService.message
- The message to printex
- The Throwable
causing the message to be logged.Copyright © 2006–2020 The Apache Software Foundation. All rights reserved.