"tag-<id>" interface message.
* ':' (colon) is now invalid in usernames for new accounts. Existing accounts
are not affected.
+* Added a new hook, 'LogException', to log exceptions in nonstandard ways.
==== External libraries ====
"<div ...>$1</div>").
- flags Integer display flags (NO_ACTION_LINK,NO_EXTRA_USER_LINKS)
+'LogException': Called before an exception (or PHP error) is logged. This is meant for integration
+with external error aggregation services; returning false will NOT prevent logging.
+$e: The exception (in case of a plain old PHP error, a wrapping ErrorException)
+$suppressed: true if the error was suppressed via error_reporting()/wfSuppressWarnings()
+
'LoginAuthenticateAudit': A login attempt for a valid user account either
succeeded or failed. No return data is accepted; this hook is for auditing only.
$user: the User object being authenticated against
if ( $json !== false ) {
wfDebugLog( 'exception-json', $json, 'private' );
}
+
+ Hooks::run( 'LogException', array( $e, false ) );
}
}
// The set_error_handler callback is independent from error_reporting.
// Filter out unwanted errors manually (e.g. when wfSuppressWarnings is active).
- if ( ( error_reporting() & $e->getSeverity() ) !== 0 ) {
+ $suppressed = ( error_reporting() & $e->getSeverity() ) === 0;
+ if ( !$suppressed ) {
$log = self::getLogMessage( $e );
if ( $wgLogExceptionBacktrace ) {
wfDebugLog( $channel, $log . "\n" . $e->getTraceAsString() );
if ( $json !== false ) {
wfDebugLog( "$channel-json", $json, 'private' );
}
+
+ Hooks::run( 'LogException', array( $e, $suppressed ) );
}
}