Package org.apache.felix.scr.impl.logger
Interface LogConfiguration
- All Known Subinterfaces:
ScrConfiguration
- All Known Implementing Classes:
ScrConfigurationImpl
public interface LogConfiguration
This 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 false
to disable the SCR logging completely.
ds.log.enabled
Also 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.extension
Note 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 -
Method Summary
Modifier and TypeMethodDescriptionReturns the current log levelboolean
Checks if the logging is enabled.boolean
Checks if the log extension is enabled.
-
Field Details
-
PROP_LOGLEVEL
The property to retrieve the log level- See Also:
-
PROP_LOG_ENABLED
The property to enable or disable the logging- See Also:
-
PROP_LOG_EXTENSION
The property to enable log extension- See Also:
-
-
Method Details
-
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:
true
if enabled otherwisefalse
-
isLogExtensionEnabled
boolean isLogExtensionEnabled()Checks if the log extension is enabled. The extension is incompatible with the OSGi specification.- Returns:
true
if enabled otherwisefalse
-