Class ConsoleLogger

  • All Implemented Interfaces:
    Logger

    public class ConsoleLogger
    extends Object
    implements Logger
    Console delegate Logger implementation.
    Since:
    4.0.0
    Author:
    Dmytro Nosan
    • Field Summary

      • Fields inherited from interface com.github.nosan.embedded.cassandra.commons.logging.Logger

        ROOT
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void debug​(String message)
      Log the message from the provided message at debug level.
      void debug​(String message, Object... args)
      Log the message from the provided message at debug level.
      void debug​(Throwable throwable, String message)
      Log the provided Throwable and message at debug level.
      void debug​(Throwable throwable, String message, Object... args)
      Log the provided Throwable and message at debug level.
      void error​(String message)
      Log the message from the provided message at error level.
      void error​(String message, Object... args)
      Log the message from the provided message at error level.
      void error​(Throwable throwable, String message)
      Log the provided Throwable and message at error level.
      void error​(Throwable throwable, String message, Object... args)
      Log the provided Throwable and message at error level.
      String getName()
      Gets the name of this Logger instance.
      void info​(String message)
      Log the message from the provided at info level.
      void info​(String message, Object... args)
      Log the message from the provided at info level.
      void info​(Throwable throwable, String message)
      Log the provided Throwable and message at info level.
      void info​(Throwable throwable, String message, Object... args)
      Log the provided Throwable and message at info level.
      boolean isDebugEnabled()
      Is the logger instance enabled for the DEBUG level.
      boolean isErrorEnabled()
      Is the logger instance enabled for the ERROR level.
      boolean isInfoEnabled()
      Is the logger instance enabled for the INFO level.
      boolean isTraceEnabled()
      Is the logger instance enabled for the TRACE level.
      boolean isWarnEnabled()
      Is the logger instance enabled for the WARN level.
      void trace​(String message)
      Log the message from the provided message at trace level.
      void trace​(String message, Object... args)
      Log the message from the provided message at trace level.
      void trace​(Throwable throwable, String message)
      Log the provided Throwable and message at trace level.
      void trace​(Throwable throwable, String message, Object... args)
      Log the provided Throwable and message at trace level.
      void warn​(String message)
      Log the message from the provided message at warn level.
      void warn​(String message, Object... args)
      Log the message from the provided message at warn level.
      void warn​(Throwable throwable, String message)
      Log the provided Throwable and message at warn level.
      void warn​(Throwable throwable, String message, Object... args)
      Log the provided Throwable and message at warn level.
    • Constructor Detail

      • ConsoleLogger

        public ConsoleLogger​(String name)
        Creates ConsoleLogger with provided args.
        Parameters:
        name - the logger name
    • Method Detail

      • error

        public void error​(Throwable throwable,
                          String message)
        Description copied from interface: Logger
        Log the provided Throwable and message at error level.
        Specified by:
        error in interface Logger
        Parameters:
        throwable - the exception (throwable) to be logged
        message - the message string to be logged
      • error

        public void error​(Throwable throwable,
                          String message,
                          Object... args)
        Description copied from interface: Logger
        Log the provided Throwable and message at error level.
        Specified by:
        error in interface Logger
        Parameters:
        throwable - the exception (throwable) to be logged
        message - the pattern string
        args - object(s) to format
        See Also:
        MessageFormat.format(String, Object...)
      • getName

        public String getName()
        Description copied from interface: Logger
        Gets the name of this Logger instance.
        Specified by:
        getName in interface Logger
        Returns:
        name of this logger instance
      • isErrorEnabled

        public boolean isErrorEnabled()
        Description copied from interface: Logger
        Is the logger instance enabled for the ERROR level.
        Specified by:
        isErrorEnabled in interface Logger
        Returns:
        true if this Logger is enabled for the ERROR level
      • error

        public void error​(String message)
        Description copied from interface: Logger
        Log the message from the provided message at error level.
        Specified by:
        error in interface Logger
        Parameters:
        message - the message string to be logged
      • warn

        public void warn​(Throwable throwable,
                         String message)
        Description copied from interface: Logger
        Log the provided Throwable and message at warn level.
        Specified by:
        warn in interface Logger
        Parameters:
        throwable - the exception (throwable) to be logged
        message - the message string to be logged
      • warn

        public void warn​(Throwable throwable,
                         String message,
                         Object... args)
        Description copied from interface: Logger
        Log the provided Throwable and message at warn level.
        Specified by:
        warn in interface Logger
        Parameters:
        throwable - the exception (throwable) to be logged
        message - the pattern string
        args - object(s) to format
        See Also:
        MessageFormat.format(String, Object...)
      • isWarnEnabled

        public boolean isWarnEnabled()
        Description copied from interface: Logger
        Is the logger instance enabled for the WARN level.
        Specified by:
        isWarnEnabled in interface Logger
        Returns:
        true if this Logger is enabled for the WARN level
      • warn

        public void warn​(String message)
        Description copied from interface: Logger
        Log the message from the provided message at warn level.
        Specified by:
        warn in interface Logger
        Parameters:
        message - the message string to be logged
      • info

        public void info​(Throwable throwable,
                         String message)
        Description copied from interface: Logger
        Log the provided Throwable and message at info level.
        Specified by:
        info in interface Logger
        Parameters:
        throwable - the exception (throwable) to be logged
        message - the message string to be logged
      • info

        public void info​(Throwable throwable,
                         String message,
                         Object... args)
        Description copied from interface: Logger
        Log the provided Throwable and message at info level.
        Specified by:
        info in interface Logger
        Parameters:
        throwable - the exception (throwable) to be logged
        message - the pattern string
        args - object(s) to format
        See Also:
        MessageFormat.format(String, Object...)
      • isInfoEnabled

        public boolean isInfoEnabled()
        Description copied from interface: Logger
        Is the logger instance enabled for the INFO level.
        Specified by:
        isInfoEnabled in interface Logger
        Returns:
        true if this Logger is enabled for the INFO level
      • info

        public void info​(String message)
        Description copied from interface: Logger
        Log the message from the provided at info level.
        Specified by:
        info in interface Logger
        Parameters:
        message - the message string to be logged
      • debug

        public void debug​(Throwable throwable,
                          String message)
        Description copied from interface: Logger
        Log the provided Throwable and message at debug level.
        Specified by:
        debug in interface Logger
        Parameters:
        throwable - the exception (throwable) to be logged
        message - the message string to be logged
      • debug

        public void debug​(Throwable throwable,
                          String message,
                          Object... args)
        Description copied from interface: Logger
        Log the provided Throwable and message at debug level.
        Specified by:
        debug in interface Logger
        Parameters:
        throwable - the exception (throwable) to be logged
        message - the pattern string
        args - object(s) to format
        See Also:
        MessageFormat.format(String, Object...)
      • isDebugEnabled

        public boolean isDebugEnabled()
        Description copied from interface: Logger
        Is the logger instance enabled for the DEBUG level.
        Specified by:
        isDebugEnabled in interface Logger
        Returns:
        true if this Logger is enabled for the DEBUG level
      • debug

        public void debug​(String message)
        Description copied from interface: Logger
        Log the message from the provided message at debug level.
        Specified by:
        debug in interface Logger
        Parameters:
        message - the message string to be logged
      • trace

        public void trace​(Throwable throwable,
                          String message)
        Description copied from interface: Logger
        Log the provided Throwable and message at trace level.
        Specified by:
        trace in interface Logger
        Parameters:
        throwable - the exception (throwable) to be logged
        message - the message string to be logged
      • trace

        public void trace​(Throwable throwable,
                          String message,
                          Object... args)
        Description copied from interface: Logger
        Log the provided Throwable and message at trace level.
        Specified by:
        trace in interface Logger
        Parameters:
        throwable - the exception (throwable) to be logged
        message - the pattern string
        args - object(s) to format
        See Also:
        MessageFormat.format(String, Object...)
      • isTraceEnabled

        public boolean isTraceEnabled()
        Description copied from interface: Logger
        Is the logger instance enabled for the TRACE level.
        Specified by:
        isTraceEnabled in interface Logger
        Returns:
        true if this Logger is enabled for the TRACE level
      • trace

        public void trace​(String message)
        Description copied from interface: Logger
        Log the message from the provided message at trace level.
        Specified by:
        trace in interface Logger
        Parameters:
        message - the message string to be logged