Class SwallowedExceptionLogger

  • All Implemented Interfaces:
    org.apache.commons.pool2.SwallowedExceptionListener

    public class SwallowedExceptionLogger
    extends java.lang.Object
    implements org.apache.commons.pool2.SwallowedExceptionListener
    Class for logging swallowed exceptions.
    Since:
    2.0
    Version:
    $Id: SwallowedExceptionLogger.java 1651275 2015-01-13 04:11:09Z psteitz $
    • Constructor Summary

      Constructors 
      Constructor Description
      SwallowedExceptionLogger​(org.apache.commons.logging.Log log)
      Create a SwallowedExceptionLogger with the given logger.
      SwallowedExceptionLogger​(org.apache.commons.logging.Log log, boolean logExpiredConnections)
      Create a SwallowedExceptionLogger with the given logger and expired connection logging property.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void onSwallowException​(java.lang.Exception e)  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SwallowedExceptionLogger

        public SwallowedExceptionLogger​(org.apache.commons.logging.Log log)
        Create a SwallowedExceptionLogger with the given logger. By default, expired connection logging is turned on.
        Parameters:
        log - logger
      • SwallowedExceptionLogger

        public SwallowedExceptionLogger​(org.apache.commons.logging.Log log,
                                        boolean logExpiredConnections)
        Create a SwallowedExceptionLogger with the given logger and expired connection logging property.
        Parameters:
        log - logger
        logExpiredConnections - false suppresses logging of expired connection events
    • Method Detail

      • onSwallowException

        public void onSwallowException​(java.lang.Exception e)
        Specified by:
        onSwallowException in interface org.apache.commons.pool2.SwallowedExceptionListener