1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 01:02:42 +01:00

Add "%I" (instance name) to application log formats

Summary:
Ref T12611. Currently, the HTTP/SSH logs don't have an option to include the instance name.

Add such an option.

Leave it out of the default logs because most installs don't use this.

Test Plan: See next changes.

Reviewers: chad, amckinley

Reviewed By: chad

Maniphest Tasks: T12611

Differential Revision: https://secure.phabricator.com/D17776
This commit is contained in:
epriestley 2017-04-23 07:15:35 -07:00
parent bef68ccdd6
commit d0e6bf831d
3 changed files with 3 additions and 0 deletions

View file

@ -35,6 +35,7 @@ final class PhabricatorAccessLogConfigOptions
'P' => pht('The logged-in user PHID, if one is logged in.'),
'i' => pht('Request input, in bytes.'),
'o' => pht('Request output, in bytes.'),
'I' => pht('Cluster instance name, if configured.'),
);
$http_map = $common_map + array(

View file

@ -30,6 +30,7 @@ final class PhabricatorAccessLog extends Phobject {
'h' => php_uname('n'),
'p' => getmypid(),
'e' => time(),
'I' => PhabricatorEnv::getEnvConfig('cluster.instance'),
));
self::$log = $log;

View file

@ -20,6 +20,7 @@ final class PhabricatorSSHLog extends Phobject {
'h' => php_uname('n'),
'p' => getmypid(),
'e' => time(),
'I' => PhabricatorEnv::getEnvConfig('cluster.instance'),
);
$sudo_user = PhabricatorEnv::getEnvConfig('phd.user');