'DatabaseOraclePostInit': Called after initialising an Oracle database
&$db: the DatabaseOracle object
+'Debug': called when outputting a debug log line via wfDebug() or wfDebugLog()
+$text: plaintext string to be output
+$group: null or a string naming a logging group (as defined in $wgDebugLogGroups)
+
'NewDifferenceEngine': Called when a new DifferenceEngine object is made
$title: the diff page title (nullable)
&$oldId: the actual old Id to use in the diff
$cache = array();
}
}
- if ( $wgDebugLogFile != '' && !$wgProfileOnly ) {
- # Strip unprintables; they can switch terminal modes when binary data
- # gets dumped, which is pretty annoying.
- $text = preg_replace( '![\x00-\x08\x0b\x0c\x0e-\x1f]!', ' ', $text );
- $text = $wgDebugLogPrefix . $text;
- wfErrorLog( $text, $wgDebugLogFile );
+ if ( wfRunHooks( 'Debug', array( $text, null /* no log group */ ) ) ) {
+ if ( $wgDebugLogFile != '' && !$wgProfileOnly ) {
+ # Strip unprintables; they can switch terminal modes when binary data
+ # gets dumped, which is pretty annoying.
+ $text = preg_replace( '![\x00-\x08\x0b\x0c\x0e-\x1f]!', ' ', $text );
+ $text = $wgDebugLogPrefix . $text;
+ wfErrorLog( $text, $wgDebugLogFile );
+ }
}
}
} else {
$host = '';
}
- wfErrorLog( "$time $host $wiki: $text", $wgDebugLogGroups[$logGroup] );
+ if ( wfRunHooks( 'Debug', array( $text, $logGroup ) ) ) {
+ wfErrorLog( "$time $host $wiki: $text", $wgDebugLogGroups[$logGroup] );
+ }
} elseif ( $public === true ) {
wfDebug( $text, true );
}