LoadMonitor: Group some logging parameters
authorChad Horohoe <chadh@wikimedia.org>
Tue, 13 Jun 2017 21:42:33 +0000 (14:42 -0700)
committerBryanDavis <bdavis@wikimedia.org>
Tue, 13 Jun 2017 22:27:00 +0000 (22:27 +0000)
Change-Id: Iefd59db547d799a02edc9f733cadb7668176d4cd

includes/libs/rdbms/loadmonitor/LoadMonitor.php

index d120b6f..4300e9f 100644 (file)
@@ -161,7 +161,10 @@ class LoadMonitor implements ILoadMonitor {
                        if ( !$conn ) {
                                $lagTimes[$i] = false;
                                $host = $this->parent->getServerName( $i );
-                               $this->replLogger->error( __METHOD__ . ": host $host is unreachable" );
+                               $this->replLogger->error(
+                                       __METHOD__ . ": host {db_server} is unreachable",
+                                       [ 'db_server' => $host ]
+                               );
                                continue;
                        }
 
@@ -171,7 +174,10 @@ class LoadMonitor implements ILoadMonitor {
                                $lagTimes[$i] = $conn->getLag();
                                if ( $lagTimes[$i] === false ) {
                                        $host = $this->parent->getServerName( $i );
-                                       $this->replLogger->error( __METHOD__ . ": host $host is not replicating?" );
+                                       $this->replLogger->error(
+                                               __METHOD__ . ": host {db_server} is not replicating?",
+                                               [ 'db_server' => $host ]
+                                       );
                                }
                        }