Package org.apache.felix.scr.impl.logger
Class LogServiceEnabledLogger
- java.lang.Object
-
- org.apache.felix.scr.impl.logger.AbstractLogger
-
- org.apache.felix.scr.impl.logger.LogServiceEnabledLogger
-
- Direct Known Subclasses:
BundleLogger
,ScrLogger
abstract class LogServiceEnabledLogger extends AbstractLogger
This abstract class adds support for using a LogService (or LoggerFactory for R7+).
-
-
Field Summary
Fields Modifier and Type Field Description private InternalLogger
currentLogger
private static java.lang.String
LOGSERVICE_CLASS
protected org.osgi.util.tracker.ServiceTracker<java.lang.Object,java.lang.Object>
logServiceTracker
protected int
trackingCount
-
Constructor Summary
Constructors Constructor Description LogServiceEnabledLogger(ScrConfiguration config, org.osgi.framework.BundleContext bundleContext)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
close()
Close the logger(package private) abstract InternalLogger
getDefaultLogger()
(package private) InternalLogger
getLogger()
Get the internal logger-
Methods inherited from class org.apache.felix.scr.impl.logger.AbstractLogger
getBundleIdentifier, getConfiguration, getPrefix, isLogEnabled, log, log, setPrefix
-
-
-
-
Field Detail
-
LOGSERVICE_CLASS
private static final java.lang.String LOGSERVICE_CLASS
- See Also:
- Constant Field Values
-
logServiceTracker
protected final org.osgi.util.tracker.ServiceTracker<java.lang.Object,java.lang.Object> logServiceTracker
-
currentLogger
private volatile InternalLogger currentLogger
-
trackingCount
protected volatile int trackingCount
-
-
Constructor Detail
-
LogServiceEnabledLogger
public LogServiceEnabledLogger(ScrConfiguration config, org.osgi.framework.BundleContext bundleContext)
-
-
Method Detail
-
close
public void close()
Close the logger
-
getLogger
InternalLogger getLogger()
Description copied from class:AbstractLogger
Get the internal logger- Specified by:
getLogger
in classAbstractLogger
- Returns:
- The internal logger
-
getDefaultLogger
abstract InternalLogger getDefaultLogger()
-
-