$destination = self::destination( $this->channel, $message, $context );
self::emit( $text, $destination );
}
- // Add to debug toolbar
- MWDebug::debugMsg( $message, array( 'channel' => $this->channel ) + $context );
+ if ( !isset( $context['private'] ) || !$context['private'] ) {
+ // Add to debug toolbar if not marked as "private"
+ MWDebug::debugMsg( $message, array( 'channel' => $this->channel ) + $context );
+ }
}
/**
// All messages on the wfErrorLog channel should be emitted.
$shouldEmit = true;
+ } elseif ( $channel === 'wfDebug' ) {
+ // wfDebug messages are emitted if a catch all logging file has
+ // been specified. Checked explicitly so that 'private' flagged
+ // messages are not discarded by unset $wgDebugLogGroups channel
+ // handling below.
+ $shouldEmit = $wgDebugLogFile != '';
+
} elseif ( isset( $wgDebugLogGroups[$channel] ) ) {
$logConfig = $wgDebugLogGroups[$channel];
$cachedTimezone = new DateTimeZone( $wgDBerrorLogTZ );
}
- // Workaround for https://bugs.php.net/bug.php?id=52063
- // Can be removed when min PHP > 5.3.6
- if ( $cachedTimezone === null ) {
- $d = date_create( 'now' );
- } else {
- $d = date_create( 'now', $cachedTimezone );
- }
+ $d = date_create( 'now', $cachedTimezone );
$date = $d->format( 'D M j G:i:s T Y' );
$host = wfHostname();