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

Log env path in BerkeleyEnvironment::Flush #14760

Merged
merged 1 commit into from Dec 4, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/wallet/db.cpp
Expand Up @@ -692,7 +692,7 @@ void BerkeleyEnvironment::Flush(bool fShutdown)
{
int64_t nStart = GetTimeMillis();
// Flush log data to the actual data file on all files that are not in use
LogPrint(BCLog::DB, "BerkeleyEnvironment::Flush: Flush(%s)%s\n", fShutdown ? "true" : "false", fDbEnvInit ? "" : " database not started");
LogPrint(BCLog::DB, "BerkeleyEnvironment::Flush: [%s] Flush(%s)%s\n", strPath, fShutdown ? "true" : "false", fDbEnvInit ? "" : " database not started");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps change the order so that that the general part of the message comes before the environment specific part of the message in order to increase readability?

That is change from …

BerkeleyEnvironment::Flush: [/Users/joao/Library/Application Support/Bitcoin/regtest/wallets/w1] Flush(true)

… to say …

BerkeleyEnvironment::Flush: Flush(true), file: /Users/joao/Library/Application Support/Bitcoin/regtest/wallets/w1

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nah, context before message, message before context, you could make a valid point to go either way

if (!fDbEnvInit)
return;
{
Expand Down