Package org.cache2k.core.log
Class Log
- java.lang.Object
-
- org.cache2k.core.log.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
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLog.JdkLoggerstatic classLog.Slf4jLoggerstatic classLog.SuppressionCounterLog implementation that can be used to count suppressed log outputs.
-
Constructor Summary
Constructors Constructor Description Log()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voiddebug(String s)abstract voiddebug(String s, Throwable ex)static voidderegisterSuppression(String s)static LoggetLog(Class<?> type)static LoggetLog(String s)abstract voidinfo(String s)abstract voidinfo(String s, Throwable ex)abstract booleanisDebugEnabled()abstract booleanisInfoEnabled()static voidregisterSuppression(String s, Log l)Redirects log output, this is used for testing purposes.abstract voidwarn(String s)abstract voidwarn(String s, Throwable ex)
-
-
-
Method Detail
-
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)
-
-