From e9a9622db3487a51f1509f3ab6f2694447bd6440 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Thu, 25 Jul 2019 12:39:26 +1000 Subject: [PATCH] rdbms: In the query log, show the server name in the message So that it is possible to distinguish master queries from replica queries. Useful when debugging issues such as T221763. Change-Id: I38896efa46f2c7cf289e5bdc543a1692e251ec1d --- includes/libs/rdbms/database/Database.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/libs/rdbms/database/Database.php b/includes/libs/rdbms/database/Database.php index 60062fbc13..e58b5f52db 100644 --- a/includes/libs/rdbms/database/Database.php +++ b/includes/libs/rdbms/database/Database.php @@ -1343,7 +1343,7 @@ abstract class Database implements IDatabase, IMaintainableDatabase, LoggerAware // Avoid the overhead of logging calls unless debug mode is enabled if ( $this->getFlag( self::DBO_DEBUG ) ) { $this->queryLogger->debug( - "{method} [{runtime}s]: $sql", + "{method} [{runtime}s] {db_host}: $sql", [ 'method' => $fname, 'db_host' => $this->getServer(), -- 2.20.1