From 2744ecb520e0f4e7ed140692c3bd0addf691bbc9 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Fri, 7 Feb 2014 02:18:29 +0100 Subject: [PATCH] Add two new debug log groups 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 | 8 ++++---- includes/Setup.php | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/includes/AutoLoader.php b/includes/AutoLoader.php index 359fd8b230..3bd398d5eb 100644 --- a/includes/AutoLoader.php +++ b/includes/AutoLoader.php @@ -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 diff --git a/includes/Setup.php b/includes/Setup.php index 0ae6e9b562..35da714a48 100644 --- a/includes/Setup.php +++ b/includes/Setup.php @@ -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' ); -- 2.20.1