Class LoggerCount

java.lang.Object
org.slf4j.ext.LoggerWrapper
org.aksw.commons.util.slf4j.LoggerCount
All Implemented Interfaces:
org.slf4j.Logger

public class LoggerCount extends org.slf4j.ext.LoggerWrapper
Wraps a logger and counts errors. Note: some ppl used appenders for this, but I do not think this is a good idea. If appenders are not properly initialized, it won't work. TODO There just has to be some class which already does the counting... but I could'nt find it yet TODO The implementation is not complete, i.e. it only warps a small a subset of the method calls
Author:
Claus Stadler <cstadler@informatik.uni-leipzig.de>
  • Field Summary

    Fields inherited from class org.slf4j.ext.LoggerWrapper

    instanceofLAL, logger

    Fields inherited from interface org.slf4j.Logger

    ROOT_LOGGER_NAME
  • Constructor Summary

    Constructors
    Constructor
    Description
    LoggerCount(org.slf4j.Logger logger)
     
    LoggerCount(org.slf4j.Logger logger, String fqcn)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    error(String message)
     
    int
     
    int
     
    void
    warn(String message)
     

    Methods inherited from class org.slf4j.ext.LoggerWrapper

    debug, debug, debug, debug, debug, debug, debug, debug, debug, debug, error, error, error, error, error, error, error, error, error, getName, info, info, info, info, info, info, info, info, info, info, isDebugEnabled, isDebugEnabled, isErrorEnabled, isErrorEnabled, isInfoEnabled, isInfoEnabled, isTraceEnabled, isTraceEnabled, isWarnEnabled, isWarnEnabled, trace, trace, trace, trace, trace, trace, trace, trace, trace, trace, warn, warn, warn, warn, warn, warn, warn, warn, warn

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.slf4j.Logger

    atDebug, atError, atInfo, atLevel, atTrace, atWarn, isEnabledForLevel, makeLoggingEventBuilder
  • Constructor Details

    • LoggerCount

      public LoggerCount(org.slf4j.Logger logger)
    • LoggerCount

      public LoggerCount(org.slf4j.Logger logger, String fqcn)
  • Method Details

    • error

      public void error(String message)
      Specified by:
      error in interface org.slf4j.Logger
      Overrides:
      error in class org.slf4j.ext.LoggerWrapper
    • warn

      public void warn(String message)
      Specified by:
      warn in interface org.slf4j.Logger
      Overrides:
      warn in class org.slf4j.ext.LoggerWrapper
    • getErrorCount

      public int getErrorCount()
    • getWarningCount

      public int getWarningCount()