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)
Thu, Dec 19, 2:51 PM
Unknown Object (File)
Sun, Dec 15, 5:25 PM
Unknown Object (File)
Wed, Dec 11, 9:38 PM
Unknown Object (File)
Sat, Dec 7, 5:37 PM
Unknown Object (File)
Fri, Dec 6, 1:16 PM
Unknown Object (File)
Mon, Dec 2, 11:12 PM
Unknown Object (File)
Wed, Nov 27, 2:22 PM
Unknown Object (File)
Wed, Nov 27, 2:22 PM
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
Branch
phd-show_args
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 582
Build 582: [Placeholder Plan] Wait for 30 Seconds

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).