Merge "debug: Add cli_argv field to monolog WikiProcessor"
This commit is contained in:
commit
c2dcf52c3c
1 changed files with 7 additions and 9 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue