Class Log

  • Direct Known Subclasses:
    Log.JdkLogger, Log.Slf4jLogger, Log.SuppressionCounter

    public abstract class Log
    extends Object
    cache2k has only sparse logging. The direct use of java.util.logging was examined. However, a thread name is missing within the output and it is not properly recorded. To have the chance to redirect any logging to the framework of choice, the log output is channeled through this class.

    To hook in another log framework provide another LogFactory implementation via the service loader.

    Author:
    Jens Wilke
    • Constructor Detail

      • Log

        public Log()
    • Method Detail

      • getLog

        public static Log getLog​(Class<?> type)
      • getLog

        public static Log getLog​(String s)
      • registerSuppression

        public static void registerSuppression​(String s,
                                               Log l)
        Redirects log output, this is used for testing purposes. Needs to be called before the log client is created.
      • deregisterSuppression

        public static void deregisterSuppression​(String s)
      • isDebugEnabled

        public abstract boolean isDebugEnabled()
      • isInfoEnabled

        public abstract boolean isInfoEnabled()
      • debug

        public abstract void debug​(String s)
      • info

        public abstract void info​(String s)
      • warn

        public abstract void warn​(String s)