Add two new debug log groups
authorAlexandre Emsenhuber <mediawiki@emsenhuber.ch>
Fri, 7 Feb 2014 01:18:29 +0000 (02:18 +0100)
committerIAlex <codereview@emsenhuber.ch>
Wed, 26 Feb 2014 20:45:33 +0000 (20:45 +0000)
So that they are easier to separate from the main debug log.
The two news are:
- 'autoloader' for messages sent by the AutoLoader class
- 'caches' for the list of cache types

Change-Id: Ifb6dc2666fec2323219bbfac94ab53a422e5312a

includes/AutoLoader.php
includes/Setup.php

index 359fd8b..3bd398d 100644 (file)
@@ -1203,17 +1203,17 @@ class AutoLoader {
                        }
 
                        if ( isset( self::$autoloadLocalClassesLower[$lowerClass] ) ) {
-                               if ( function_exists( 'wfDebug' ) ) {
-                                       wfDebug( "Class {$className} was loaded using incorrect case.\n" );
+                               if ( function_exists( 'wfDebugLog' ) ) {
+                                       wfDebugLog( 'autoloader', "Class {$className} was loaded using incorrect case" );
                                }
                                $filename = self::$autoloadLocalClassesLower[$lowerClass];
                        }
                }
 
                if ( !$filename ) {
-                       if ( function_exists( 'wfDebug' ) ) {
+                       if ( function_exists( 'wfDebugLog' ) ) {
                                # FIXME: This is not very polite.  Assume we do not manage the class.
-                               wfDebug( "Class {$className} not found; skipped loading\n" );
+                               wfDebugLog( 'autoloader', "Class {$className} not found; skipped loading" );
                        }
 
                        # Give up
index 0ae6e9b..35da714 100644 (file)
@@ -503,9 +503,9 @@ $messageMemc = wfGetMessageCacheStorage();
 $parserMemc = wfGetParserCacheStorage();
 $wgLangConvMemc = wfGetLangConverterCacheStorage();
 
-wfDebug( 'CACHES: ' . get_class( $wgMemc ) . '[main] ' .
+wfDebugLog( 'caches', get_class( $wgMemc ) . '[main] ' .
        get_class( $messageMemc ) . '[message] ' .
-       get_class( $parserMemc ) . "[parser]\n" );
+       get_class( $parserMemc ) . '[parser]' );
 
 wfProfileOut( $fname . '-memcached' );