Package org.apache.tomcat.dbcp.dbcp2
Class SwallowedExceptionLogger
java.lang.Object
org.apache.tomcat.dbcp.dbcp2.SwallowedExceptionLogger
- All Implemented Interfaces:
SwallowedExceptionListener
Class for logging swallowed exceptions.
- Since:
- 2.0
-
Constructor Summary
ConstructorsConstructorDescriptionCreate a SwallowedExceptionLogger with the given logger.SwallowedExceptionLogger(Log log, boolean logExpiredConnections) Create a SwallowedExceptionLogger with the given logger and expired connection logging property. -
Method Summary
Modifier and TypeMethodDescriptionvoidNotifies this instance every time the implementation unavoidably swallows an exception.
-
Constructor Details
-
SwallowedExceptionLogger
Create a SwallowedExceptionLogger with the given logger. By default, expired connection logging is turned on.- Parameters:
log- logger
-
SwallowedExceptionLogger
Create a SwallowedExceptionLogger with the given logger and expired connection logging property.- Parameters:
log- loggerlogExpiredConnections- false suppresses logging of expired connection events
-
-
Method Details
-
onSwallowException
Description copied from interface:SwallowedExceptionListenerNotifies this instance every time the implementation unavoidably swallows an exception.- Specified by:
onSwallowExceptionin interfaceSwallowedExceptionListener- Parameters:
e- The exception that was swallowed
-