From: Ævar Arnfjörð Bjarmason Date: Mon, 19 Sep 2005 12:52:32 +0000 (+0000) Subject: * Added a new paramater to wfDebugLog() X-Git-Tag: 1.6.0~1611 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/journal.php?a=commitdiff_plain;h=2c37b2fd62515739ef0a85fa9118f48038119bfc;p=lhc%2Fweb%2Fwiklou.git * Added a new paramater to wfDebugLog() --- 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 ); } }