Page MenuHomePhabricator

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

Authored by joshuaspence on May 19 2014, 10:08 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Sep 9, 3:10 PM
Unknown Object (File)
Sun, Sep 1, 7:32 AM
Unknown Object (File)
Sun, Sep 1, 7:32 AM
Unknown Object (File)
Sun, Sep 1, 7:32 AM
Unknown Object (File)
Sun, Sep 1, 7:32 AM
Unknown Object (File)
Sun, Sep 1, 7:21 AM
Unknown Object (File)
Wed, Aug 28, 3:08 AM
Unknown Object (File)
Mon, Aug 26, 7:39 AM
Subscribers

Details

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"].

Diff Detail

Repository
rP Phabricator
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

joshuaspence retitled this revision from to Show daemon arguments when launching a daemon with `./bin/phd`..
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added a reviewer: epriestley.

What do you think about using csprintf('%R', $arg) here ("readable argument"), or adding csprintf('%LR', $argv) for a list of %R, instead of JSON?

Happy to accept/pull this as-is if you don't want to bother doing the lifting, we can always clean it up later.

In D9205#7, @epriestley wrote:

What do you think about using csprintf('%R', $arg) here ("readable argument"), or adding csprintf('%LR', $argv) for a list of %R, instead of JSON?

Happy to accept/pull this as-is if you don't want to bother doing the lifting, we can always clean it up later.

This sounds reasonable and not too much effort. I'll see what I can come up with.

What would you expect the output to look like from csprintf('%LR', $args)?

For this:

csprintf('%LR', array('x', 'y z'));

I would expect:

x 'y z'
joshuaspence edited edge metadata.

Use csprintf('%LR', $argv) instead of json_encode($argv).

epriestley edited edge metadata.
This revision is now accepted and ready to land.May 20 2014, 11:35 PM
epriestley updated this revision to Diff 21920.

Closed by commit rPb6d15377dda0 (authored by @joshuaspence, committed by @epriestley).