Class Logger


  • public class Logger
    extends java.lang.Object
    Internal logger to be used in order to avoid a mandatory dependency on OSGi LogService. It first tries to log to a log service implementation if there is one available and then fallback to System out/err in case there is no log service available.
    • Constructor Summary

      Constructors 
      Constructor Description
      Logger​(org.osgi.framework.BundleContext context)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void log​(int level, java.lang.String message)
      Logs a message.
      void log​(int level, java.lang.String message, java.lang.Throwable exception)
      Logs a message.
      • Methods inherited from class java.lang.Object

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

      • Logger

        public Logger​(org.osgi.framework.BundleContext context)
        Constructor.
        Parameters:
        context - bundle context
    • Method Detail

      • log

        public void log​(int level,
                        java.lang.String message)
        Logs a message.
        Parameters:
        level - The severity of the message. T
        message - Human readable string describing the condition or null.
        See Also:
        LogService.log(int, String)
      • log

        public void log​(int level,
                        java.lang.String message,
                        java.lang.Throwable exception)
        Logs a message.
        Parameters:
        level - The severity of the message. T
        message - Human readable string describing the condition or null.
        exception - The exception that reflects the condition or null.
        See Also:
        LogService.log(int, String, Throwable)