r75003 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75002‎ | r75003 | r75004 >
Date:06:27, 19 October 2010
Author:hashar
Status:ok (Comments)
Tags:
Comment:
Follow up r74962, debug messages should be splitted.
This is to avoid log mess with concurrent accesses and to allow logging between the messages.

Makes the message more readeable:
Connecting to localhost wikidb...
Connected to localhost wikidb.
Connection failed to localhost wikidb.
Modified paths:
  • /trunk/phase3/includes/db/LoadBalancer.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/db/LoadBalancer.php
@@ -647,12 +647,12 @@
648648 $class = 'Database' . ucfirst( $type );
649649
650650 # Create object
651 - wfDebug( "Connecting to $host $dbname... " );
 651+ wfDebug( "Connecting to $host $dbname...\n" );
652652 $db = new $class( $host, $user, $password, $dbname, 1, $flags );
653653 if ( $db->isOpen() ) {
654 - wfDebug( "Connected.\n" );
 654+ wfDebug( "Connected to $host $dbname.\n" );
655655 } else {
656 - wfDebug( "Failed.\n" );
 656+ wfDebug( "Connection failed to $host $dbname.\n" );
657657 }
658658 $db->setLBInfo( $server );
659659 if ( isset( $server['fakeSlaveLag'] ) ) {

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r74962Make some wfDebug() messages nicer to look at in debug log file.hashar19:56, 18 October 2010

Comments

#Comment by Hashar (talk | contribs)   06:30, 19 October 2010

As per Brion comment on r74962.

Status & tagging log