Class ScrLoggerFactory


  • public final class ScrLoggerFactory
    extends java.lang.Object
    This is used to retrieve the appropriate logger instance based on a specific log configuration
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private ScrLoggerFactory()
      Non-instantiable
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static ScrLogger create​(org.osgi.framework.BundleContext context, LogConfiguration config)
      Retrieves the logger based on the provided log configuration If the logging is disabled, the NoOpLogger is used If the logging is enabled but the log extension is disabled, use ScrLogManager If the logging is enabled and the log extension is also enabled, use ExtLogManager
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ScrLoggerFactory

        private ScrLoggerFactory()
        Non-instantiable
    • Method Detail

      • create

        public static ScrLogger create​(org.osgi.framework.BundleContext context,
                                       LogConfiguration config)
        Retrieves the logger based on the provided log configuration
        • If the logging is disabled, the NoOpLogger is used
        • If the logging is enabled but the log extension is disabled, use ScrLogManager
        • If the logging is enabled and the log extension is also enabled, use ExtLogManager
        Parameters:
        context - the bundle context of the SCR bundle
        config - the log configuration
        Returns:
        the logger