Class NoOpLogger

  • All Implemented Interfaces:
    LogSpi

    public class NoOpLogger
    extends Object
    implements LogSpi
    No operation logger. This LogSpi does nothing it is synonymous with /dev/null.
    Since:
    1.0
    Version:
    $Revision: 1.4 $
    Author:
    Will Droste
    • Constructor Detail

      • NoOpLogger

        public NoOpLogger()
    • Method Detail

      • log

        public void log​(Class<?> clazz,
                        String methodName,
                        Log.Level level,
                        String message,
                        Throwable ex)
        Logs nothing. Its a black hole command.
        Specified by:
        log in interface LogSpi
        Parameters:
        clazz - Class that logging.
        level - the level at which to log.
        message - optional message to send to the log.
        ex - optional exception at logging point.
      • log

        public void log​(Class<?> clazz,
                        StackTraceElement method,
                        Log.Level level,
                        String message,
                        Throwable ex)
        Description copied from interface: LogSpi
        Log given the class, level, message, and exception.
        Specified by:
        log in interface LogSpi
        Parameters:
        clazz - Class that logging.
        level - the level at which to log.
        message - optional message to send to the log.
        ex - optional exception at logging point.
      • isLoggable

        public boolean isLoggable​(Class<?> clazz,
                                  Log.Level level)
        Always returns false because there nothing to do.
        Specified by:
        isLoggable in interface LogSpi
      • needToInferCaller

        public boolean needToInferCaller​(Class<?> clazz,
                                         Log.Level level)
        Description copied from interface: LogSpi
        Determines if Log need to infer caller based on Class and Level.
        Specified by:
        needToInferCaller in interface LogSpi