mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-20 13:37:28 +02:00
blockstorage: use debug log category
This commit is contained in:
parent
da94ebc2fa
commit
31b2b802b5
4 changed files with 5 additions and 3 deletions
|
|
@ -161,6 +161,7 @@ const CLogCategoryDesc LogCategories[] =
|
|||
{BCLog::IPC, "ipc"},
|
||||
{BCLog::LOCK, "lock"},
|
||||
{BCLog::UTIL, "util"},
|
||||
{BCLog::BLOCKSTORE, "blockstorage"},
|
||||
{BCLog::ALL, "1"},
|
||||
{BCLog::ALL, "all"},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ namespace BCLog {
|
|||
IPC = (1 << 23),
|
||||
LOCK = (1 << 24),
|
||||
UTIL = (1 << 25),
|
||||
BLOCKSTORE = (1 << 26),
|
||||
ALL = ~(uint32_t)0,
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ void UnlinkPrunedFiles(const std::set<int>& setFilesToPrune)
|
|||
FlatFilePos pos(*it, 0);
|
||||
fs::remove(BlockFileSeq().FileName(pos));
|
||||
fs::remove(UndoFileSeq().FileName(pos));
|
||||
LogPrintf("Prune: %s deleted blk/rev (%05u)\n", __func__, *it);
|
||||
LogPrint(BCLog::BLOCKSTORE, "Prune: %s deleted blk/rev (%05u)\n", __func__, *it);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -261,7 +261,7 @@ bool FindBlockPos(FlatFilePos& pos, unsigned int nAddSize, unsigned int nHeight,
|
|||
|
||||
if ((int)nFile != nLastBlockFile) {
|
||||
if (!fKnown) {
|
||||
LogPrint(BCLog::VALIDATION, "Leaving block file %i: %s\n", nLastBlockFile, vinfoBlockFile[nLastBlockFile].ToString());
|
||||
LogPrint(BCLog::BLOCKSTORE, "Leaving block file %i: %s\n", nLastBlockFile, vinfoBlockFile[nLastBlockFile].ToString());
|
||||
}
|
||||
FlushBlockFile(!fKnown, finalize_undo);
|
||||
nLastBlockFile = nFile;
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@ class RpcMiscTest(BitcoinTestFramework):
|
|||
self.log.info("test logging rpc and help")
|
||||
|
||||
# Test logging RPC returns the expected number of logging categories.
|
||||
assert_equal(len(node.logging()), 26)
|
||||
assert_equal(len(node.logging()), 27)
|
||||
|
||||
# Test toggling a logging category on/off/on with the logging RPC.
|
||||
assert_equal(node.logging()['qt'], True)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue