Class SwallowedExceptionLogger
- java.lang.Object
-
- org.datanucleus.store.rdbms.datasource.dbcp2.SwallowedExceptionLogger
-
- All Implemented Interfaces:
SwallowedExceptionListener
public class SwallowedExceptionLogger extends Object implements SwallowedExceptionListener
Class for logging swallowed exceptions.- Since:
- 2.0
-
-
Constructor Summary
Constructors Constructor Description SwallowedExceptionLogger(org.datanucleus.util.NucleusLogger log)
Create a SwallowedExceptionLogger with the given logger.SwallowedExceptionLogger(org.datanucleus.util.NucleusLogger 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(Exception e)
This method is called every time the implementation unavoidably swallows an exception.
-
-
-
Constructor Detail
-
SwallowedExceptionLogger
public SwallowedExceptionLogger(org.datanucleus.util.NucleusLogger log)
Create a SwallowedExceptionLogger with the given logger. By default, expired connection logging is turned on.- Parameters:
log
- logger
-
SwallowedExceptionLogger
public SwallowedExceptionLogger(org.datanucleus.util.NucleusLogger log, boolean logExpiredConnections)
Create a SwallowedExceptionLogger with the given logger and expired connection logging property.- Parameters:
log
- loggerlogExpiredConnections
- false suppresses logging of expired connection events
-
-
Method Detail
-
onSwallowException
public void onSwallowException(Exception e)
Description copied from interface:SwallowedExceptionListener
This method is called every time the implementation unavoidably swallows an exception.- Specified by:
onSwallowException
in interfaceSwallowedExceptionListener
- Parameters:
e
- The exception that was swallowed
-
-