public interface PaxLoggingService
extends org.osgi.service.log.LogService
LogService.
It should be implemented by specific logging provider (Log4j, Logback, ...).
It's role is to provide methods to obtain PaxLogger and PaxContext that are specific to
one of pax-logging-* implementations.
Since OSGi| Modifier and Type | Method and Description |
|---|---|
PaxLogger |
getLogger(org.osgi.framework.Bundle bundle,
String category,
String fqcn)
|
org.osgi.service.log.LogLevel |
getLogLevel()
Returns R7
LogLevel (actually, a threahold) associated with entire logging service. |
PaxContext |
getPaxContext()
Returns
PaxContext of this service that gives access to thread-bound MDC context. |
PaxLogger getLogger(org.osgi.framework.Bundle bundle, String category, String fqcn)
PaxLogger instance - implementation-specific logger hidden under PaxLogger interface.
This method is not used directly, but rather through PaxLoggingManager
Since R7 (Pax Logging 2.0.0), similar methods to obtain a logger come directly from LoggerFactory
interface. Some of these methods may configure returned logger to use printf or Slf4J style of formatting. This
methods returns loggers that use Slf4J formatting.
This method should be called by framework-specific facades (like org.ops4j.pax.logging.slf4j.Slf4jLogger)
which pass proper fqcn.org.osgi.service.log.LogLevel getLogLevel()
LogLevel (actually, a threahold) associated with entire logging service. Usually individual
loggers may have different levels specified.PaxContext getPaxContext()
PaxContext of this service that gives access to thread-bound MDC context.Copyright © 2006–2023 OPS4J - Open Participation Software for Java. All rights reserved.