Merge "debug: Add cli_argv field to monolog WikiProcessor"

This commit is contained in:
jenkins-bot 2017-08-21 05:00:08 +00:00 committed by Gerrit Code Review
commit c2dcf52c3c

View file

@ -35,15 +35,13 @@ class WikiProcessor {
*/
public function __invoke( array $record ) {
global $wgVersion;
$record['extra'] = array_merge(
$record['extra'],
[
'host' => wfHostname(),
'wiki' => wfWikiID(),
'mwversion' => $wgVersion,
'reqId' => \WebRequest::getRequestId(),
]
);
$record['extra']['host'] = wfHostname();
$record['extra']['wiki'] = wfWikiID();
$record['extra']['mwversion'] = $wgVersion;
$record['extra']['reqId'] = \WebRequest::getRequestId();
if ( PHP_SAPI === 'cli' && isset( $_SERVER['argv'] ) ) {
$record['extra']['cli_argv'] = implode( ' ', $_SERVER['argv'] );
}
return $record;
}