Interface Logger

  • All Known Implementing Classes:
    SimpleLogger, Slf4jMonologLogger

    public interface Logger
    This interface decouples the logging wrapper from the actual implementation. It allows to leave unchanged the code previously using Monolog.
    • Method Detail

      • setLevel

        void setLevel​(Level level)
        Sets the Level attribute of the Logger object. If level is null inherits from parent logger.
        Parameters:
        level - The new level value
      • setLevel

        void setLevel​(String level)
               throws Exception
        Sets the Level attribute of the Logger object. If level is null inherits from parent logger.
        Parameters:
        level - The new level value.
        Throws:
        Exception - The level is unknown.
      • isLoggable

        boolean isLoggable​(Level level)
        Gets the Loggable attribute of the LoggerImpl object
        Parameters:
        level - Description of Parameter
        Returns:
        The Loggable value
      • log

        void log​(Level level,
                 String msg)
        Log a message, with no arguments. If the logger is currently enabled for the given message level then the given message is treated
      • log

        void log​(Level level,
                 String msg,
                 Throwable t)
        Log a message, with a throwable arguments which can represent an error or a context..
      • log

        void log​(Level level,
                 String msg,
                 Object param1)
        Log a message, with one object parameter.

        If the logger is currently enabled for the given message level then a corresponding LogRecord is created and forwarded to all the registered output Handler objects.

        Parameters:
        level - One of the message level identifiers, e.g., SEVERE
        msg - The string message (or a key in the message catalog)
        param1 - parameter to the message
      • log

        void log​(Level level,
                 String msg,
                 Object[] params)
        Log a message, with an array of object arguments.

        If the logger is currently enabled for the given message level then a corresponding LogRecord is created and forwarded to all the registered output Handler objects.

        Parameters:
        level - One of the message level identifiers, e.g., SEVERE
        msg - The string message (or a key in the message catalog)
        params - array of parameters to the message