Interface PaxLoggingService

  • All Superinterfaces:
    org.osgi.service.log.LoggerFactory, org.osgi.service.log.LogService

    public interface PaxLoggingService
    extends org.osgi.service.log.LogService
    This interface extends 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
    • Field Summary

      • Fields inherited from interface org.osgi.service.log.LogService

        LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_WARNING
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      PaxLogger getLogger​(org.osgi.framework.Bundle bundle, String category, String fqcn)
      Obtains PaxLogger instance - implementation-specific logger hidden under PaxLogger interface.
      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.
      • Methods inherited from interface org.osgi.service.log.LoggerFactory

        getLogger, getLogger, getLogger, getLogger, getLogger
      • Methods inherited from interface org.osgi.service.log.LogService

        log, log, log, log
    • Method Detail

      • getLogger

        PaxLogger getLogger​(org.osgi.framework.Bundle bundle,
                            String category,
                            String fqcn)
        Obtains 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.
      • getLogLevel

        org.osgi.service.log.LogLevel getLogLevel()
        Returns R7 LogLevel (actually, a threahold) associated with entire logging service. Usually individual loggers may have different levels specified.
        Since:
        2.0.0
      • getPaxContext

        PaxContext getPaxContext()
        Returns PaxContext of this service that gives access to thread-bound MDC context.
        Returns: