This matches the logging used for opening new connections and can be
useful for seeing connection leakage.
Change-Id: I8d24d059062f3b698e64751b46542eb1fa78bb36
public function closeAll() {
$this->forEachOpenConnection( function ( IDatabase $conn ) {
+ $host = $conn->getServer();
+ $this->connLogger->debug( "Closing connection to database '$host'." );
$conn->close();
} );
foreach ( $connsByServer[$serverIndex] as $i => $trackedConn ) {
if ( $conn === $trackedConn ) {
+ $host = $this->getServerName( $i );
+ $this->connLogger->debug( "Closing connection to database $i at '$host'." );
unset( $this->mConns[$type][$serverIndex][$i] );
--$this->connsOpened;
break 2;