From: Tim Starling Date: Thu, 25 Jul 2019 02:39:26 +0000 (+1000) Subject: rdbms: In the query log, show the server name in the message X-Git-Tag: 1.34.0-rc.0~792^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/journal.php?a=commitdiff_plain;h=e9a9622db3487a51f1509f3ab6f2694447bd6440;p=lhc%2Fweb%2Fwiklou.git 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 --- 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(),