Skip to content

Commit 272cd09

Browse files
MarcoFalkehodlinator
authored andcommitted
log: Use warning level while scanning wallet dir
1 parent 1777644 commit 272cd09

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/wallet/db.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ std::vector<std::pair<fs::path, std::string>> ListDatabases(const fs::path& wall
5656
}
5757
}
5858
} catch (const std::exception& e) {
59-
LogPrintf("%s: Error scanning %s: %s\n", __func__, fs::PathToString(it->path()), e.what());
59+
LogWarning("Error while scanning wallet dir item: %s [%s].", e.what(), fs::PathToString(it->path()));
6060
it.disable_recursion_pending();
6161
}
6262
}
@@ -99,7 +99,7 @@ bool IsBDBFile(const fs::path& path)
9999
// This check also prevents opening lock files.
100100
std::error_code ec;
101101
auto size = fs::file_size(path, ec);
102-
if (ec) LogPrintf("%s: %s %s\n", __func__, ec.message(), fs::PathToString(path));
102+
if (ec) LogWarning("Error reading file_size: %s [%s]", ec.message(), fs::PathToString(path));
103103
if (size < 4096) return false;
104104

105105
std::ifstream file{path, std::ios::binary};
@@ -123,7 +123,7 @@ bool IsSQLiteFile(const fs::path& path)
123123
// A SQLite Database file is at least 512 bytes.
124124
std::error_code ec;
125125
auto size = fs::file_size(path, ec);
126-
if (ec) LogPrintf("%s: %s %s\n", __func__, ec.message(), fs::PathToString(path));
126+
if (ec) LogWarning("Error reading file_size: %s [%s]", ec.message(), fs::PathToString(path));
127127
if (size < 512) return false;
128128

129129
std::ifstream file{path, std::ios::binary};

test/functional/wallet_multiwallet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ def wallet_file(name):
147147
os.mkdir(wallet_dir('no_access'))
148148
os.chmod(wallet_dir('no_access'), 0)
149149
try:
150-
with self.nodes[0].assert_debug_log(expected_msgs=['Error scanning']):
150+
with self.nodes[0].assert_debug_log(expected_msgs=["Error while scanning wallet dir"]):
151151
walletlist = self.nodes[0].listwalletdir()['wallets']
152152
finally:
153153
# Need to ensure access is restored for cleanup

0 commit comments

Comments
 (0)