Package org.apache.felix.utils.log
Class Logger
java.lang.Object
org.apache.felix.utils.log.Logger
Internal logger to be used in order to avoid a mandatory dependency on OSGi LogService.
It first tries to log to a log service implementation if there is one available and then fallback to System out/err
in case there is no log service available.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
LOG_ERROR
public static final int LOG_ERROR- See Also:
-
LOG_WARNING
public static final int LOG_WARNING- See Also:
-
LOG_INFO
public static final int LOG_INFO- See Also:
-
LOG_DEBUG
public static final int LOG_DEBUG- See Also:
-
-
Constructor Details
-
Logger
public Logger(org.osgi.framework.BundleContext context) Constructor.- Parameters:
context
- bundle context
-
-
Method Details
-
log
Logs a message.- Parameters:
level
- The severity of the message. Tmessage
- Human readable string describing the condition ornull
.- See Also:
-
LogService.log(int, String)
-
log
Logs a message.- Parameters:
level
- The severity of the message. Tmessage
- Human readable string describing the condition ornull
.exception
- The exception that reflects the condition ornull
.- See Also:
-
LogService.log(int, String, Throwable)
-