Class AbstractCouchbaseLogger

    • Constructor Detail

      • AbstractCouchbaseLogger

        protected AbstractCouchbaseLogger​(String name)
        Creates a new instance.
    • Method Detail

      • isEnabled

        public boolean isEnabled​(CouchbaseLogLevel level)
        Description copied from interface: CouchbaseLogger
        Is the logger instance enabled for the specified level?
        Specified by:
        isEnabled in interface CouchbaseLogger
        Returns:
        True if this Logger is enabled for the specified level, false otherwise.
      • trace

        public void trace​(Throwable t)
        Description copied from interface: CouchbaseLogger
        Log an exception (throwable) at the TRACE level.
        Specified by:
        trace in interface CouchbaseLogger
        Parameters:
        t - the exception (throwable) to log
      • debug

        public void debug​(Throwable t)
        Description copied from interface: CouchbaseLogger
        Log an exception (throwable) at the DEBUG level.
        Specified by:
        debug in interface CouchbaseLogger
        Parameters:
        t - the exception (throwable) to log
      • info

        public void info​(Throwable t)
        Description copied from interface: CouchbaseLogger
        Log an exception (throwable) at the INFO level.
        Specified by:
        info in interface CouchbaseLogger
        Parameters:
        t - the exception (throwable) to log
      • warn

        public void warn​(Throwable t)
        Description copied from interface: CouchbaseLogger
        Log an exception (throwable) at the WARN level.
        Specified by:
        warn in interface CouchbaseLogger
        Parameters:
        t - the exception (throwable) to log
      • error

        public void error​(Throwable t)
        Description copied from interface: CouchbaseLogger
        Log an exception (throwable) at the ERROR level.
        Specified by:
        error in interface CouchbaseLogger
        Parameters:
        t - the exception (throwable) to log
      • log

        public void log​(CouchbaseLogLevel level,
                        String msg,
                        Throwable cause)
        Description copied from interface: CouchbaseLogger
        Log an exception (throwable) at the specified level with an accompanying message.
        Specified by:
        log in interface CouchbaseLogger
        msg - the message accompanying the exception
        cause - the exception (throwable) to log
      • log

        public void log​(CouchbaseLogLevel level,
                        String format,
                        Object arg)
        Description copied from interface: CouchbaseLogger
        Log a message at the specified level according to the specified format and argument.

        This form avoids superfluous object creation when the logger is disabled for the specified level.

        Specified by:
        log in interface CouchbaseLogger
        format - the format string
        arg - the argument
      • log

        public void log​(CouchbaseLogLevel level,
                        String format,
                        Object argA,
                        Object argB)
        Description copied from interface: CouchbaseLogger
        Log a message at the specified level according to the specified format and arguments.

        This form avoids superfluous object creation when the logger is disabled for the specified level.

        Specified by:
        log in interface CouchbaseLogger
        format - the format string
        argA - the first argument
        argB - the second argument
      • log

        public void log​(CouchbaseLogLevel level,
                        String format,
                        Object... arguments)
        Description copied from interface: CouchbaseLogger
        Log a message at the specified level according to the specified format and arguments.

        This form avoids superfluous string concatenation when the logger is disabled for the specified level. However, this variant incurs the hidden (and relatively small) cost of creating an Object[] before invoking the method, even if this logger is disabled for the specified level. The variants taking one and two arguments exist solely in order to avoid this hidden cost.

        Specified by:
        log in interface CouchbaseLogger
        format - the format string
        arguments - a list of 3 or more arguments