Interface LogSpi

  • All Known Implementing Classes:
    SanitizedLogger

    public interface LogSpi
    Logging 'Service Provider Interface'.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean isLoggable​(java.lang.Class<?> clazz, Log.Level level)
      Determines if the it should be logged based on Class and Level.
      void log​(java.lang.Class<?> clazz, java.lang.StackTraceElement caller, Log.Level level, java.lang.String message, java.lang.Throwable ex)
      Log given the class, level, message, and exception.
      void log​(java.lang.Class<?> clazz, java.lang.String method, Log.Level level, java.lang.String message, java.lang.Throwable ex)
      Log given the class, level, message, and exception.
      boolean needToInferCaller​(java.lang.Class<?> clazz, Log.Level level)
      Determines if Log need to infer caller based on Class and Level.
    • Method Detail

      • log

        void log​(java.lang.Class<?> clazz,
                 java.lang.String method,
                 Log.Level level,
                 java.lang.String message,
                 java.lang.Throwable ex)
        Log given the class, level, message, and exception.
        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

        void log​(java.lang.Class<?> clazz,
                 java.lang.StackTraceElement caller,
                 Log.Level level,
                 java.lang.String message,
                 java.lang.Throwable ex)
        Log given the class, level, message, and exception.
        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

        boolean isLoggable​(java.lang.Class<?> clazz,
                           Log.Level level)
        Determines if the it should be logged based on Class and Level.
      • needToInferCaller

        boolean needToInferCaller​(java.lang.Class<?> clazz,
                                  Log.Level level)
        Determines if Log need to infer caller based on Class and Level.