Merge "MimeAnalyzer: Add testcases for mp3 detection"
[lhc/web/wiklou.git] / includes / debug / logger / monolog / WikiProcessor.php
index 9a357ee..5e32887 100644 (file)
 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 {
 
@@ -37,11 +37,12 @@ class WikiProcessor {
                global $wgVersion;
                $record['extra'] = array_merge(
                        $record['extra'],
-                       array(
+                       [
                                'host' => wfHostname(),
                                'wiki' => wfWikiID(),
                                'mwversion' => $wgVersion,
-                       )
+                               'reqId' => \WebRequest::getRequestId(),
+                       ]
                );
                return $record;
        }