Follow up r74962, debug messages should be splitted.
authorAntoine Musso <hashar@users.mediawiki.org>
Tue, 19 Oct 2010 06:27:25 +0000 (06:27 +0000)
committerAntoine Musso <hashar@users.mediawiki.org>
Tue, 19 Oct 2010 06:27:25 +0000 (06:27 +0000)
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.

includes/db/LoadBalancer.php

index 6c768e9..1977390 100644 (file)
@@ -647,12 +647,12 @@ class LoadBalancer {
                $class = 'Database' . ucfirst( $type );
 
                # Create object
-               wfDebug( "Connecting to $host $dbname... " );
+               wfDebug( "Connecting to $host $dbname...\n" );
                $db = new $class( $host, $user, $password, $dbname, 1, $flags );
                if ( $db->isOpen() ) {
-                       wfDebug( "Connected.\n" );
+                       wfDebug( "Connected to $host $dbname.\n" );
                } else {
-                       wfDebug( "Failed.\n" );
+                       wfDebug( "Connection failed to $host $dbname.\n" );
                }
                $db->setLBInfo( $server );
                if ( isset( $server['fakeSlaveLag'] ) ) {