52 $format =
null, $dateFormat =
null, $allowInlineLineBreaks =
false,
53 $ignoreEmptyContextAndExtra =
false, $includeStacktraces =
false
56 $format, $dateFormat, $allowInlineLineBreaks,
57 $ignoreEmptyContextAndExtra
67 unset( $record[
'context'][
'private'] );
71 $prettyException =
'';
72 if (
isset( $record[
'context'][
'exception'] ) &&
73 strpos( $this->format,
'%exception%' ) !==
false
75 $e = $record[
'context'][
'exception'];
76 unset( $record[
'context'][
'exception'] );
78 if (
$e instanceof Exception ) {
87 $output = parent::format( $record );
114 'message' =>
$e->getMessage(),
115 'code' =>
$e->getCode(),
116 'file' =>
$e->getFile(),
117 'line' =>
$e->getLine(),
121 $prev =
$e->getPrevious();
137 'class' =>
'Unknown',
140 'message' =>
'unknown',
145 $str =
"\n[Exception {$e['class']}] (" .
146 "{$e['file']}:{$e['line']}) {$e['message']}";
148 if ( $this->includeStacktraces &&
$e[
'trace'] ) {
153 if (
isset(
$e[
'previous'] ) ) {
154 $prev =
$e[
'previous'];
157 $str .=
"\nCaused by: [Exception {$prev['class']}] (" .
158 "{$prev['file']}:{$prev['line']}) {$prev['message']}";
160 if ( $this->includeStacktraces && $prev[
'trace'] ) {
167 $prev = $prev[
'previous'] ??
null;
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
Handler class for MWExceptions.
static prettyPrintTrace(array $trace, $pad='')
Generate a string representation of a stacktrace.
static redactTrace(array $trace)
Redact a stacktrace generated by Exception::getTrace(), debug_backtrace() or similar means.
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that When $user is not it can be in the form of< username >< more info > e g for bot passwords intended to be added to log contexts Fields it might only if the login was with a bot password it is not rendered in wiki pages or galleries in category pages allow injecting custom HTML after the section Any uses of the hook need to handle escaping see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array or by returning and letting standard HTTP rendering take place modifiable or by returning false and taking over the output $out
static configuration should be added through ResourceLoaderGetConfigVars instead can be used to get the real title e g db for database replication lag or jobqueue for job queue size converted to pseudo seconds It is possible to add more fields and they will be returned to the user in the API response after the basic globals have been set but before ordinary actions take place $output
returning false will NOT prevent logging $e
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))