blockstorage: use debug log category
This commit is contained in:
1 parent
da94ebc2fa
commit
31b2b802b5
4 files changed
+5
-3
No files matched your search
@@ -161,6 +161,7 @@ const CLogCategoryDesc LogCategories[] =
|
|||||||
{BCLog::IPC, "ipc"},
|
{BCLog::IPC, "ipc"},
|
||||||
{BCLog::LOCK, "lock"},
|
{BCLog::LOCK, "lock"},
|
||||||
{BCLog::UTIL, "util"},
|
{BCLog::UTIL, "util"},
|
||||||
|
{BCLog::BLOCKSTORE, "blockstorage"},
|
||||||
{BCLog::ALL, "1"},
|
{BCLog::ALL, "1"},
|
||||||
{BCLog::ALL, "all"},
|
{BCLog::ALL, "all"},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ namespace BCLog {
|
|||||||
IPC = (1 << 23),
|
IPC = (1 << 23),
|
||||||
LOCK = (1 << 24),
|
LOCK = (1 << 24),
|
||||||
UTIL = (1 << 25),
|
UTIL = (1 << 25),
|
||||||
|
BLOCKSTORE = (1 << 26),
|
||||||
ALL = ~(uint32_t)0,
|
ALL = ~(uint32_t)0,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -204,7 +204,7 @@ void UnlinkPrunedFiles(const std::set<int>& setFilesToPrune)
|
|||||||
FlatFilePos pos(*it, 0);
|
FlatFilePos pos(*it, 0);
|
||||||
fs::remove(BlockFileSeq().FileName(pos));
|
fs::remove(BlockFileSeq().FileName(pos));
|
||||||
fs::remove(UndoFileSeq().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 ((int)nFile != nLastBlockFile) {
|
||||||
if (!fKnown) {
|
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);
|
FlushBlockFile(!fKnown, finalize_undo);
|
||||||
nLastBlockFile = nFile;
|
nLastBlockFile = nFile;
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ class RpcMiscTest(BitcoinTestFramework):
|
|||||||
self.log.info("test logging rpc and help")
|
self.log.info("test logging rpc and help")
|
||||||
|
|
||||||
# Test logging RPC returns the expected number of logging categories.
|
# 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.
|
# Test toggling a logging category on/off/on with the logging RPC.
|
||||||
assert_equal(node.logging()['qt'], True)
|
assert_equal(node.logging()['qt'], True)
|
||||||
|
|||||||
Reference in new issue
Block a user