Class 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
    • 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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void error​(String message)  
      int getErrorCount()  
      int getWarningCount()  
      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
    • Constructor Detail

      • LoggerCount

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

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

      • 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()