Class NoOpLogger
java.lang.Object
org.apache.felix.scr.impl.logger.NoOpLogger
- All Implemented Interfaces:
BundleLogger, ComponentLogger, InternalLogger, ScrLogger
This is a dummy logger which is only used when the logging is not enabled at all.
-
Nested Class Summary
Nested classes/interfaces inherited from interface InternalLogger
InternalLogger.Level -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbundle(org.osgi.framework.Bundle bundle) Create a bundle loggervoidclose()Close the log managerbooleanisLogEnabled(InternalLogger.Level level) Answer true if the current logging level is enabled for the given level.voidlog(InternalLogger.Level level, String message, Throwable ex) Logs the message to an appropriate OSGi logger.voidlog(InternalLogger.Level level, String message, Throwable ex, Object... args) Formats the message using theMessageFormatclass, i.e.voidsetComponentId(long componentId)
-
Constructor Details
-
NoOpLogger
public NoOpLogger()
-
-
Method Details
-
log
Description copied from interface:InternalLoggerLogs the message to an appropriate OSGi logger. If not such logger can be found then it will log to stderr for ERROR invalid input: '&' AUDIT messages and stdout for other messages- Specified by:
login interfaceInternalLogger- Parameters:
level- only log when this level is implied by the current log levelmessage- the message to logex- a Throwable or null
-
log
Description copied from interface:InternalLoggerFormats the message using theMessageFormatclass, i.e. with {} place holders for the args. It then callsInternalLogger.log(Level, String, Throwable).- Specified by:
login interfaceInternalLogger- Parameters:
level- only log when this level is implied by the current log levelmessage- the message to logex- a Throwable or nullargs- the arguments to theMessageFormatformatting
-
isLogEnabled
Description copied from interface:InternalLoggerAnswer true if the current logging level is enabled for the given level. For stdout/stderr fallback the logging level is defined by theLogConfiguration.getLogLevel(). If there is an OSGi logger available then the logger name will define the log level viaLoggerAdmin.- Specified by:
isLogEnabledin interfaceInternalLogger- Parameters:
level- the level to check- Returns:
- true if the given log level is enabled
-
setComponentId
public void setComponentId(long componentId) - Specified by:
setComponentIdin interfaceComponentLogger
-
component
public ComponentLogger component(org.osgi.framework.Bundle bundle, String implementationClassName, String name) - Specified by:
componentin interfaceBundleLogger
-
bundle
Description copied from interface:ScrLoggerCreate a bundle logger -
close
-