Skip to content

Commit e90478f

Browse files
committed
log: harmonize bitcoind server logging
Harmonize the user-facing output of the `bitcoind -daemon`, `bitcoin-cli help stop`, `bitcoin-cli stop`, and `bitcoind -version` commands to be consistent with each other as well as with the "Bitcoin Core is probably already running" messages, e.g. `git grep 'probably already running.")'`.
1 parent e653eef commit e90478f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/bitcoind.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Copyright (c) 2009-2010 Satoshi Nakamoto
2-
// Copyright (c) 2009-2018 The Bitcoin Core developers
2+
// Copyright (c) 2009-2019 The Bitcoin Core developers
33
// Distributed under the MIT software license, see the accompanying
44
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
55

@@ -77,15 +77,15 @@ static bool AppInit(int argc, char* argv[])
7777

7878
// Process help and version before taking care about datadir
7979
if (HelpRequested(gArgs) || gArgs.IsArgSet("-version")) {
80-
std::string strUsage = PACKAGE_NAME " Daemon version " + FormatFullVersion() + "\n";
80+
std::string strUsage = PACKAGE_NAME " version " + FormatFullVersion() + "\n";
8181

8282
if (gArgs.IsArgSet("-version"))
8383
{
8484
strUsage += FormatParagraph(LicenseInfo()) + "\n";
8585
}
8686
else
8787
{
88-
strUsage += "\nUsage: bitcoind [options] Start " PACKAGE_NAME " Daemon\n";
88+
strUsage += "\nUsage: bitcoind [options] Start " PACKAGE_NAME "\n";
8989
strUsage += "\n" + gArgs.GetHelpMessage();
9090
}
9191

@@ -143,7 +143,7 @@ static bool AppInit(int argc, char* argv[])
143143
#pragma GCC diagnostic push
144144
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
145145
#endif
146-
tfm::format(std::cout, PACKAGE_NAME " daemon starting\n");
146+
tfm::format(std::cout, PACKAGE_NAME " starting\n");
147147

148148
// Daemonize
149149
if (daemon(1, 0)) { // don't chdir (1), do close FDs (0)

src/rpc/server.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ UniValue stop(const JSONRPCRequest& jsonRequest)
162162
if (jsonRequest.fHelp || jsonRequest.params.size() > 1)
163163
throw std::runtime_error(
164164
RPCHelpMan{"stop",
165-
"\nStop Bitcoin server.",
165+
"\nRequest a graceful shutdown of " PACKAGE_NAME ".",
166166
{},
167167
RPCResults{},
168168
RPCExamples{""},
@@ -173,7 +173,7 @@ UniValue stop(const JSONRPCRequest& jsonRequest)
173173
if (jsonRequest.params[0].isNum()) {
174174
MilliSleep(jsonRequest.params[0].get_int());
175175
}
176-
return "Bitcoin server stopping";
176+
return PACKAGE_NAME " stopping";
177177
}
178178

179179
static UniValue uptime(const JSONRPCRequest& jsonRequest)

0 commit comments

Comments
 (0)