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

Show daemon arguments when launching a daemon with ./bin/phd.

Summary: Ref T4735. When launching daemons (with `./bin/phd start` or `./bin/phd launch`), print the arguments that are specified for the daemon.

Test Plan:
Ran `./bin/phd launch repo -- --not X`.

```
> sudo ./bin/phd launch repo -- --not X
Preparing to launch daemons.
NOTE: Logs will appear in '/mnt/logs/phd/daemons.log'.

Launching daemon "PhabricatorRepositoryPullLocalDaemon" with arguments ["--not","X"].
```

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T4735

Differential Revision: https://secure.phabricator.com/D9205
This commit is contained in:
Joshua Spence 2014-05-20 16:45:13 -07:00 committed by epriestley
parent 76dc959c65
commit b6d15377dd

View file

@ -99,15 +99,32 @@ abstract class PhabricatorDaemonManagementWorkflow
$console = PhutilConsole::getConsole();
if ($debug) {
$console->writeOut(
pht(
'Launching daemon "%s" in debug mode (not daemonized).',
$daemon)."\n");
if ($argv) {
$console->writeOut(
pht(
"Launching daemon \"%s\" in debug mode (not daemonized) ".
"with arguments %s.\n",
$daemon,
csprintf('%LR', $argv)));
} else {
$console->writeOut(
pht(
"Launching daemon \"%s\" in debug mode (not daemonized).\n",
$daemon));
}
} else {
$console->writeOut(
pht(
'Launching daemon "%s".',
$daemon)."\n");
if ($argv) {
$console->writeOut(
pht(
"Launching daemon \"%s\" with arguments %s.\n",
$daemon,
csprintf('%LR', $argv)));
} else {
$console->writeOut(
pht(
"Launching daemon \"%s\".\n",
$daemon));
}
}
foreach ($argv as $key => $arg) {