MediaWiki master
WikiProcessor.php
Go to the documentation of this file.
1<?php
8
11
21
26 public function __invoke( array $record ) {
27 $telemetry = Telemetry::getInstance();
28 $record['extra']['host'] = wfHostname();
29 $record['extra']['wiki'] = WikiMap::getCurrentWikiId();
30 $record['extra']['mwversion'] = MW_VERSION;
31 $record['extra']['reqId'] = $telemetry->getRequestId();
32 if ( wfIsCLI() && isset( $_SERVER['argv'] ) ) {
33 $record['extra']['cli_argv'] = implode( ' ', $_SERVER['argv'] );
34 }
35 return $record;
36 }
37
38}
wfIsCLI()
Check if we are running from the commandline.
const MW_VERSION
The running version of MediaWiki.
Definition Defines.php:23
wfHostname()
Get host name of the current machine, for use in error reporting.
Service for handling telemetry data.
Definition Telemetry.php:15
Annotate log records with request-global metadata, such as the hostname, wiki / request ID,...
Tools for dealing with other locally-hosted wikis.
Definition WikiMap.php:19