Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SetUsageMessage For daemons #4134

Merged
merged 2 commits into from
Apr 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/daemons/GraphDaemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ DECLARE_bool(containerized);

int main(int argc, char *argv[]) {
google::SetVersionString(nebula::versionString());
google::SetUsageMessage("Usage: " + std::string(argv[0]) + " [options]");
if (argc == 1) {
printHelp(argv[0]);
return EXIT_FAILURE;
Expand Down
1 change: 1 addition & 0 deletions src/daemons/MetaDaemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ extern Status setupBreakpad();

int main(int argc, char* argv[]) {
google::SetVersionString(nebula::versionString());
google::SetUsageMessage("Usage: " + std::string(argv[0]) + " [options]");
// Detect if the server has already been started
// Check pid before glog init, in case of user may start daemon twice
// the 2nd will make the 1st failed to output log anymore
Expand Down
1 change: 1 addition & 0 deletions src/daemons/StandAloneDaemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ DEFINE_int32(meta_port, 45500, "Meta daemon listening port");

int main(int argc, char *argv[]) {
google::SetVersionString(nebula::versionString());
google::SetUsageMessage("Usage: " + std::string(argv[0]) + " [options]");
gflags::ParseCommandLineFlags(&argc, &argv, false);

if (argc == 1) {
Expand Down
1 change: 1 addition & 0 deletions src/daemons/StorageDaemon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ extern Status setupBreakpad();

int main(int argc, char *argv[]) {
google::SetVersionString(nebula::versionString());
google::SetUsageMessage("Usage: " + std::string(argv[0]) + " [options]");
// Detect if the server has already been started
// Check pid before glog init, in case of user may start daemon twice
// the 2nd will make the 1st failed to output log anymore
Expand Down