Package org.apache.tomcat.dbcp.dbcp2
Class SwallowedExceptionLogger
- java.lang.Object
- 
- org.apache.tomcat.dbcp.dbcp2.SwallowedExceptionLogger
 
- 
- All Implemented Interfaces:
- SwallowedExceptionListener
 
 public class SwallowedExceptionLogger extends java.lang.Object implements SwallowedExceptionListener Class for logging swallowed exceptions.- Since:
- 2.0
 
- 
- 
Constructor SummaryConstructors Constructor Description SwallowedExceptionLogger(Log log)Create a SwallowedExceptionLogger with the given logger.SwallowedExceptionLogger(Log log, boolean logExpiredConnections)Create a SwallowedExceptionLogger with the given logger and expired connection logging property.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description voidonSwallowException(java.lang.Exception e)Notifies this instance every time the implementation unavoidably swallows an exception.
 
- 
- 
- 
Constructor Detail- 
SwallowedExceptionLoggerpublic SwallowedExceptionLogger(Log log) Create a SwallowedExceptionLogger with the given logger. By default, expired connection logging is turned on.- Parameters:
- log- logger
 
 - 
SwallowedExceptionLoggerpublic SwallowedExceptionLogger(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- 
onSwallowExceptionpublic void onSwallowException(java.lang.Exception e) Description copied from interface:SwallowedExceptionListenerNotifies this instance every time the implementation unavoidably swallows an exception.- Specified by:
- onSwallowExceptionin interface- SwallowedExceptionListener
- Parameters:
- e- The exception that was swallowed
 
 
- 
 
-