Package org.ops4j.pax.logging
Interface PaxLoggingService
-
- All Superinterfaces:
org.osgi.service.log.LoggerFactory,org.osgi.service.log.LogService
public interface PaxLoggingService extends org.osgi.service.log.LogServiceThis interface extendsLogService. It should be implemented by specific logging provider (Log4j, Logback, ...). It's role is to provide methods to obtainPaxLoggerandPaxContextthat are specific to one of pax-logging-* implementations. Since OSGi
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PaxLoggergetLogger(org.osgi.framework.Bundle bundle, String category, String fqcn)org.osgi.service.log.LogLevelgetLogLevel()Returns R7LogLevel(actually, a threahold) associated with entire logging service.PaxContextgetPaxContext()ReturnsPaxContextof this service that gives access to thread-bound MDC context.
-
-
-
Method Detail
-
getLogger
PaxLogger getLogger(org.osgi.framework.Bundle bundle, String category, String fqcn)
ObtainsPaxLoggerinstance - implementation-specific logger hidden underPaxLoggerinterface. This method is not used directly, but rather throughPaxLoggingManagerSince R7 (Pax Logging 2.0.0), similar methods to obtain a logger come directly fromLoggerFactoryinterface. 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 (likeorg.ops4j.pax.logging.slf4j.Slf4jLogger) which pass properfqcn.
-
getLogLevel
org.osgi.service.log.LogLevel getLogLevel()
Returns R7LogLevel(actually, a threahold) associated with entire logging service. Usually individual loggers may have different levels specified.- Since:
- 2.0.0
-
getPaxContext
PaxContext getPaxContext()
ReturnsPaxContextof this service that gives access to thread-bound MDC context.- Returns:
-
-