Class Logger


  • public class Logger
    extends org.apache.felix.resolver.Logger

    This class mimics the standard OSGi LogService interface. An instance of this class is used by the framework for all logging. By default this class logs messages to standard out. The log level can be set to control the amount of logging performed, where a higher number results in more logging. A log level of zero turns off logging completely.

    The log levels match those specified in the OSGi Log Service (i.e., 1 = error, 2 = warning, 3 = information, and 4 = debug). The default value is 1.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.Object[] m_logger  
      • Fields inherited from class org.apache.felix.resolver.Logger

        LOG_DEBUG, LOG_ERROR, LOG_INFO, LOG_WARNING
    • Constructor Summary

      Constructors 
      Constructor Description
      Logger()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void _log​(Bundle bundle, ServiceReference sr, int level, java.lang.String msg, java.lang.Throwable throwable)  
      protected void doLog​(int level, java.lang.String msg, java.lang.Throwable throwable)  
      protected void doLog​(Bundle bundle, ServiceReference sr, int level, java.lang.String msg, java.lang.Throwable throwable)  
      protected void doLogOut​(int level, java.lang.String s, java.lang.Throwable throwable)  
      protected void doLogReflectively​(int level, java.lang.String msg, java.lang.Throwable throwable)  
      void log​(Bundle bundle, int level, java.lang.String msg)  
      void log​(Bundle bundle, int level, java.lang.String msg, java.lang.Throwable throwable)  
      void log​(ServiceReference sr, int level, java.lang.String msg)  
      void log​(ServiceReference sr, int level, java.lang.String msg, java.lang.Throwable throwable)  
      void setLogger​(java.lang.Object logger)  
      • Methods inherited from class org.apache.felix.resolver.Logger

        debug, getLogLevel, isDebugEnabled, log, log, logUsesConstraintViolation, setLogLevel
      • Methods inherited from class java.lang.Object

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

      • m_logger

        private java.lang.Object[] m_logger
    • Constructor Detail

      • Logger

        public Logger()
    • Method Detail

      • setLogger

        public void setLogger​(java.lang.Object logger)
      • log

        public final void log​(ServiceReference sr,
                              int level,
                              java.lang.String msg)
      • log

        public final void log​(ServiceReference sr,
                              int level,
                              java.lang.String msg,
                              java.lang.Throwable throwable)
      • log

        public final void log​(Bundle bundle,
                              int level,
                              java.lang.String msg)
      • log

        public final void log​(Bundle bundle,
                              int level,
                              java.lang.String msg,
                              java.lang.Throwable throwable)
      • _log

        protected void _log​(Bundle bundle,
                            ServiceReference sr,
                            int level,
                            java.lang.String msg,
                            java.lang.Throwable throwable)
      • doLog

        protected void doLog​(Bundle bundle,
                             ServiceReference sr,
                             int level,
                             java.lang.String msg,
                             java.lang.Throwable throwable)
      • doLog

        protected void doLog​(int level,
                             java.lang.String msg,
                             java.lang.Throwable throwable)
        Overrides:
        doLog in class org.apache.felix.resolver.Logger
      • doLogOut

        protected void doLogOut​(int level,
                                java.lang.String s,
                                java.lang.Throwable throwable)
      • doLogReflectively

        protected void doLogReflectively​(int level,
                                         java.lang.String msg,
                                         java.lang.Throwable throwable)