* Added a new paramater to wfDebugLog()
authorÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Mon, 19 Sep 2005 12:52:32 +0000 (12:52 +0000)
committerÆvar Arnfjörð Bjarmason <avar@users.mediawiki.org>
Mon, 19 Sep 2005 12:52:32 +0000 (12:52 +0000)
includes/GlobalFunctions.php

index b971d90..27d59eb 100644 (file)
@@ -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 );
        }
 }