From 2c37b2fd62515739ef0a85fa9118f48038119bfc Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Mon, 19 Sep 2005 12:52:32 +0000 Subject: [PATCH] * Added a new paramater to wfDebugLog() --- includes/GlobalFunctions.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index b971d90c87..27d59eb535 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -178,15 +178,18 @@ function wfDebug( $text, $logonly = false ) { /** * Send a line to a supplementary debug log file, if configured, or main debug log if not. * $wgDebugLogGroups[$logGroup] should be set to a filename to send to a separate log. + * * @param string $logGroup * @param string $text + * @param bool $public Whether to log the event in the public log if no private + * log file is specified, (default true) */ -function wfDebugLog( $logGroup, $text ) { +function wfDebugLog( $logGroup, $text, $public = true ) { global $wgDebugLogGroups, $wgDBname; if( $text{strlen( $text ) - 1} != "\n" ) $text .= "\n"; if( isset( $wgDebugLogGroups[$logGroup] ) ) { @error_log( "$wgDBname: $text", 3, $wgDebugLogGroups[$logGroup] ); - } else { + } else if ( $public === true ) { wfDebug( $text, true ); } } -- 2.20.1