Package org.apache.felix.scr.impl.logger
Interface LogConfiguration
-
- All Known Subinterfaces:
ScrConfiguration
- All Known Implementing Classes:
ScrConfigurationImpl
public interface LogConfigurationThis is used to deal with the log configuration.The log configuration comprises the following:
- The associated log level
- flag if the log is enabled
- flag if the log extension is enabled
Note that, any consumer can decide if the logging in SCR is at all required. By default, the SCR logging will be enabled. Consumer can decide to set the following property to
falseto disable the SCR logging completely.ds.log.enabledAlso note that, consumer can also decide to enable log extension by setting the following property to
true. This also implies that the logging is enabled.ds.log.extensionNote that, by default SCR uses the log level of the bundle that contains the SCR components to log the messages, but the log extension uses the log level of the SCR bundle itself to log the messages.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPROP_LOG_ENABLEDThe property to enable or disable the loggingstatic java.lang.StringPROP_LOG_EXTENSIONThe property to enable log extensionstatic java.lang.StringPROP_LOGLEVELThe property to retrieve the log level
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description InternalLogger.LevelgetLogLevel()Returns the current log levelbooleanisLogEnabled()Checks if the logging is enabled.booleanisLogExtensionEnabled()Checks if the log extension is enabled.
-
-
-
Field Detail
-
PROP_LOGLEVEL
static final java.lang.String PROP_LOGLEVEL
The property to retrieve the log level- See Also:
- Constant Field Values
-
PROP_LOG_ENABLED
static final java.lang.String PROP_LOG_ENABLED
The property to enable or disable the logging- See Also:
- Constant Field Values
-
PROP_LOG_EXTENSION
static final java.lang.String PROP_LOG_EXTENSION
The property to enable log extension- See Also:
- Constant Field Values
-
-
Method Detail
-
getLogLevel
InternalLogger.Level getLogLevel()
Returns the current log level- Returns:
- the log level (cannot be
null)
-
isLogEnabled
boolean isLogEnabled()
Checks if the logging is enabled. Disabling logging is incompatible with the OSGi specification.- Returns:
trueif enabled otherwisefalse
-
isLogExtensionEnabled
boolean isLogExtensionEnabled()
Checks if the log extension is enabled. The extension is incompatible with the OSGi specification.- Returns:
trueif enabled otherwisefalse
-
-