log: Use warning level while scanning wallet dir
This commit is contained in:
1 parent
1777644367
commit
272cd09b79
2 files changed
+4
-4
No files matched your search
+3
-3
@@ -56,7 +56,7 @@ std::vector<std::pair<fs::path, std::string>> ListDatabases(const fs::path& wall
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (const std::exception& e) {
|
} catch (const std::exception& e) {
|
||||||
LogPrintf("%s: Error scanning %s: %s\n", __func__, fs::PathToString(it->path()), e.what());
|
LogWarning("Error while scanning wallet dir item: %s [%s].", e.what(), fs::PathToString(it->path()));
|
||||||
it.disable_recursion_pending();
|
it.disable_recursion_pending();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -99,7 +99,7 @@ bool IsBDBFile(const fs::path& path)
|
|||||||
// This check also prevents opening lock files.
|
// This check also prevents opening lock files.
|
||||||
std::error_code ec;
|
std::error_code ec;
|
||||||
auto size = fs::file_size(path, ec);
|
auto size = fs::file_size(path, ec);
|
||||||
if (ec) LogPrintf("%s: %s %s\n", __func__, ec.message(), fs::PathToString(path));
|
if (ec) LogWarning("Error reading file_size: %s [%s]", ec.message(), fs::PathToString(path));
|
||||||
if (size < 4096) return false;
|
if (size < 4096) return false;
|
||||||
|
|
||||||
std::ifstream file{path, std::ios::binary};
|
std::ifstream file{path, std::ios::binary};
|
||||||
@@ -123,7 +123,7 @@ bool IsSQLiteFile(const fs::path& path)
|
|||||||
// A SQLite Database file is at least 512 bytes.
|
// A SQLite Database file is at least 512 bytes.
|
||||||
std::error_code ec;
|
std::error_code ec;
|
||||||
auto size = fs::file_size(path, ec);
|
auto size = fs::file_size(path, ec);
|
||||||
if (ec) LogPrintf("%s: %s %s\n", __func__, ec.message(), fs::PathToString(path));
|
if (ec) LogWarning("Error reading file_size: %s [%s]", ec.message(), fs::PathToString(path));
|
||||||
if (size < 512) return false;
|
if (size < 512) return false;
|
||||||
|
|
||||||
std::ifstream file{path, std::ios::binary};
|
std::ifstream file{path, std::ios::binary};
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ class MultiWalletTest(BitcoinTestFramework):
|
|||||||
os.mkdir(wallet_dir('no_access'))
|
os.mkdir(wallet_dir('no_access'))
|
||||||
os.chmod(wallet_dir('no_access'), 0)
|
os.chmod(wallet_dir('no_access'), 0)
|
||||||
try:
|
try:
|
||||||
with self.nodes[0].assert_debug_log(expected_msgs=['Error scanning']):
|
with self.nodes[0].assert_debug_log(expected_msgs=["Error while scanning wallet dir"]):
|
||||||
walletlist = self.nodes[0].listwalletdir()['wallets']
|
walletlist = self.nodes[0].listwalletdir()['wallets']
|
||||||
finally:
|
finally:
|
||||||
# Need to ensure access is restored for cleanup
|
# Need to ensure access is restored for cleanup
|
||||||
|
|||||||
Reference in new issue
Block a user