OpenQuizz
Une application de gestion des contenus pédagogiques
ConnectionPoolLogger Class Reference
Inheritance diagram for ConnectionPoolLogger:
Collaboration diagram for ConnectionPoolLogger:

Public Member Functions

def pool_created (self, event)
 
def pool_cleared (self, event)
 
def pool_closed (self, event)
 
def connection_created (self, event)
 
def connection_ready (self, event)
 
def connection_closed (self, event)
 
def connection_check_out_started (self, event)
 
def connection_check_out_failed (self, event)
 
def connection_checked_out (self, event)
 
def connection_checked_in (self, event)
 

Detailed Description

A simple listener that logs server connection pool events.

Listens for :class:`~pymongo.monitoring.PoolCreatedEvent`,
:class:`~pymongo.monitoring.PoolClearedEvent`,
:class:`~pymongo.monitoring.PoolClosedEvent`,
:~pymongo.monitoring.class:`ConnectionCreatedEvent`,
:class:`~pymongo.monitoring.ConnectionReadyEvent`,
:class:`~pymongo.monitoring.ConnectionClosedEvent`,
:class:`~pymongo.monitoring.ConnectionCheckOutStartedEvent`,
:class:`~pymongo.monitoring.ConnectionCheckOutFailedEvent`,
:class:`~pymongo.monitoring.ConnectionCheckedOutEvent`,
and :class:`~pymongo.monitoring.ConnectionCheckedInEvent`
events and logs them at the `INFO` severity level using :mod:`logging`.

.. versionadded:: 3.11

Member Function Documentation

◆ connection_check_out_failed()

def connection_check_out_failed (   self,
  event 
)
Abstract method to handle a :class:`ConnectionCheckOutFailedEvent`.

Emitted when the driver's attempt to check out a connection fails.

:Parameters:
  - `event`: An instance of :class:`ConnectionCheckOutFailedEvent`.

Reimplemented from ConnectionPoolListener.

◆ connection_check_out_started()

def connection_check_out_started (   self,
  event 
)
Abstract method to handle a :class:`ConnectionCheckOutStartedEvent`.

Emitted when the driver starts attempting to check out a connection.

:Parameters:
  - `event`: An instance of :class:`ConnectionCheckOutStartedEvent`.

Reimplemented from ConnectionPoolListener.

◆ connection_checked_in()

def connection_checked_in (   self,
  event 
)
Abstract method to handle a :class:`ConnectionCheckedInEvent`.

Emitted when the driver checks in a Connection back to the Connection
Pool.

:Parameters:
  - `event`: An instance of :class:`ConnectionCheckedInEvent`.

Reimplemented from ConnectionPoolListener.

◆ connection_checked_out()

def connection_checked_out (   self,
  event 
)
Abstract method to handle a :class:`ConnectionCheckedOutEvent`.

Emitted when the driver successfully checks out a Connection.

:Parameters:
  - `event`: An instance of :class:`ConnectionCheckedOutEvent`.

Reimplemented from ConnectionPoolListener.

◆ connection_closed()

def connection_closed (   self,
  event 
)
Abstract method to handle a :class:`ConnectionClosedEvent`.

Emitted when a Connection Pool closes a Connection.

:Parameters:
  - `event`: An instance of :class:`ConnectionClosedEvent`.

Reimplemented from ConnectionPoolListener.

◆ connection_created()

def connection_created (   self,
  event 
)
Abstract method to handle a :class:`ConnectionCreatedEvent`.

Emitted when a Connection Pool creates a Connection object.

:Parameters:
  - `event`: An instance of :class:`ConnectionCreatedEvent`.

Reimplemented from ConnectionPoolListener.

◆ connection_ready()

def connection_ready (   self,
  event 
)
Abstract method to handle a :class:`ConnectionReadyEvent`.

Emitted when a Connection has finished its setup, and is now ready to
use.

:Parameters:
  - `event`: An instance of :class:`ConnectionReadyEvent`.

Reimplemented from ConnectionPoolListener.

◆ pool_cleared()

def pool_cleared (   self,
  event 
)
Abstract method to handle a `PoolClearedEvent`.

Emitted when a Connection Pool is cleared.

:Parameters:
  - `event`: An instance of :class:`PoolClearedEvent`.

Reimplemented from ConnectionPoolListener.

◆ pool_closed()

def pool_closed (   self,
  event 
)
Abstract method to handle a `PoolClosedEvent`.

Emitted when a Connection Pool is closed.

:Parameters:
  - `event`: An instance of :class:`PoolClosedEvent`.

Reimplemented from ConnectionPoolListener.

◆ pool_created()

def pool_created (   self,
  event 
)
Abstract method to handle a :class:`PoolCreatedEvent`.

Emitted when a Connection Pool is created.

:Parameters:
  - `event`: An instance of :class:`PoolCreatedEvent`.

Reimplemented from ConnectionPoolListener.


The documentation for this class was generated from the following file: