From: Aaron Schulz Date: Tue, 4 Oct 2016 20:51:03 +0000 (-0700) Subject: Make DatabaseMysqlBase use connLogger for connection errors X-Git-Tag: 1.31.0-rc.0~5182^2 X-Git-Url: https://git.cyclocoop.org/%7B%24admin_url%7Dcompta/operations/modifier.php?a=commitdiff_plain;h=5c3d22a029278794ff92997554eee021245df93b;p=lhc%2Fweb%2Fwiklou.git Make DatabaseMysqlBase use connLogger for connection errors Previously, they went to queryLogger, which is not the proper log. Change-Id: Ifeea2261afc9572bf613a96306537f564b3e95d7 --- diff --git a/includes/libs/rdbms/database/DatabaseMysqlBase.php b/includes/libs/rdbms/database/DatabaseMysqlBase.php index d654429317..f504ec4d91 100644 --- a/includes/libs/rdbms/database/DatabaseMysqlBase.php +++ b/includes/libs/rdbms/database/DatabaseMysqlBase.php @@ -129,14 +129,14 @@ abstract class DatabaseMysqlBase extends Database { if ( !$error ) { $error = $this->lastError(); } - $this->queryLogger->error( + $this->connLogger->error( "Error connecting to {db_server}: {error}", $this->getLogContext( [ 'method' => __METHOD__, 'error' => $error, ] ) ); - $this->queryLogger->debug( "DB connection error\n" . + $this->connLogger->debug( "DB connection error\n" . "Server: $server, User: $user, Password: " . substr( $password, 0, 3 ) . "..., error: " . $error . "\n" );