namespace MediaWiki\Logger\Monolog;
/**
- * Injects `wfHostname()`, `wfWikiID()` and `$wgVersion` in all records.
+ * Annotate log records with request-global metadata, such as the hostname,
+ * wiki / request ID, and MediaWiki version.
*
* @since 1.25
- * @author Bryan Davis <bd808@wikimedia.org>
- * @copyright © 2013 Bryan Davis and Wikimedia Foundation.
+ * @copyright © 2013 Wikimedia Foundation and contributors
*/
class WikiProcessor {
global $wgVersion;
$record['extra'] = array_merge(
$record['extra'],
- array(
+ [
'host' => wfHostname(),
'wiki' => wfWikiID(),
'mwversion' => $wgVersion,
- )
+ 'reqId' => \WebRequest::getRequestId(),
+ ]
);
return $record;
}