Package elf4j

Interface Logger

    • Method Detail

      • instance

        static Logger instance()
        Service access API
        Returns:
        Logger instance with default name and Level
      • atLevel

        Logger atLevel​(Level level)
        Service access API
        Parameters:
        level - of the requested Logger instance
        Returns:
        Logger instance of the specified level
      • getLevel

        Level getLevel()
        Service interface API
        Returns:
        Severity level of the logger instance
      • isEnabled

        boolean isEnabled()
        Service interface API
        Returns:
        true if the active logging of this instance enabled per configuration, false otherwise
      • log

        void log​(Object message)
        Service interface API
        Parameters:
        message - to be logged. If the actual type is Supplier, the result of Supplier.get(), instead of the message itself, should be used to construct the final log message.
      • log

        void log​(String message,
                 Object... args)
        Service interface API
        Parameters:
        message - to be logged
        args - the arguments to replace the placeholders in the message. If any of the argument's actual type is Supplier, the result of Supplier.get(), instead of the argument itself, should be used to construct the final log message.
      • log

        void log​(Throwable t)
        Service interface API
        Parameters:
        t - the Throwable to be logged
      • log

        void log​(Throwable t,
                 Object message)
        Service interface API
        Parameters:
        t - the Throwable to be logged
        message - the message to be logged. If the actual type is Supplier, the result of Supplier.get(), instead of the message itself, should be used to construct the final log message.
      • log

        void log​(Throwable t,
                 String message,
                 Object... args)
        Service interface API
        Parameters:
        t - the Throwable to be logged
        message - the message to be logged
        args - the arguments to replace the placeholders in the message. If any of argument's actual type is Supplier, the result of Supplier.get(), instead of the argument itself, should be used to construct the final log message.
      • atTrace

        default Logger atTrace()
        Service access API
        Returns:
        Logger instance with Level.TRACE severity level
      • atDebug

        default Logger atDebug()
        Service access API
        Returns:
        Logger instance with Level.DEBUG severity level
      • atInfo

        default Logger atInfo()
        Service access API
        Returns:
        Logger instance with Level.INFO severity level
      • atWarn

        default Logger atWarn()
        Service access API
        Returns:
        Logger instance with Level.WARN severity level
      • atError

        default Logger atError()
        Service access API
        Returns:
        Logger instance with Level.ERROR severity level