Class LoggerFactory

    • Method Detail

      • getLogger

        public static Logger getLogger​(String name)
        Gets a logger with the given name.
        Parameters:
        name - the name
        Returns:
        the logger
      • getLogger

        public static Logger getLogger​(Class<?> clazz)
        Gets a logger, using the class name as name for the logger.
        Parameters:
        clazz - the clazz
        Returns:
        the logger
      • getLogger

        public static Logger getLogger​(Bundle bundle,
                                       String name)
        Gets a logger with the given name for the given bundle.

        If the logging bundle happens to be known in the context in which getLogger is called, this method should be preferred over getLogger(String) because the latter implies a small overhead for finding out the calling bundle.

        Parameters:
        bundle - the bundle
        name - the name
        Returns:
        the logger
      • getLogger

        public static Logger getLogger​(Bundle bundle,
                                       Class<?> clazz)
        Gets a logger with the given class' name for the given bundle.

        If the logging bundle happens to be known in the context in which getLogger is called, this method should be preferred over getLogger(Class) because the latter implies a small overhead for finding out the calling bundle.

        Parameters:
        bundle - the bundle
        clazz - the class
        Returns:
        the logger