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
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private final org.datanucleus.util.NucleusLogger
     
    private final boolean
     
  • 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

    Modifier and Type
    Method
    Description
    void
    This method is called every time the implementation unavoidably swallows an exception.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • log

      private final org.datanucleus.util.NucleusLogger log
    • logExpiredConnections

      private final boolean logExpiredConnections
  • Constructor Details

    • 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 - logger
      logExpiredConnections - false suppresses logging of expired connection events
  • Method Details