MediaWiki REL1_31
WikiProcessor.php
Go to the documentation of this file.
1<?php
22
31
36 public function __invoke( array $record ) {
37 global $wgVersion;
38 $record['extra']['host'] = wfHostname();
39 $record['extra']['wiki'] = wfWikiID();
40 $record['extra']['mwversion'] = $wgVersion;
41 $record['extra']['reqId'] = \WebRequest::getRequestId();
42 if ( wfIsCLI() && isset( $_SERVER['argv'] ) ) {
43 $record['extra']['cli_argv'] = implode( ' ', $_SERVER['argv'] );
44 }
45 return $record;
46 }
47
48}
$wgVersion
MediaWiki version number.
wfHostname()
Fetch server name for use in error reporting etc.
wfIsCLI()
Check if we are running from the commandline.
wfWikiID()
Get an ASCII string identifying this wiki This is used as a prefix in memcached keys.
Annotate log records with request-global metadata, such as the hostname, wiki / request ID,...