diff options
-rw-r--r-- | src/logging.cpp | 1 | ||||
-rw-r--r-- | src/logging.h | 1 | ||||
-rw-r--r-- | src/node/blockstorage.cpp | 4 | ||||
-rwxr-xr-x | test/functional/rpc_misc.py | 2 |
4 files changed, 5 insertions, 3 deletions
diff --git a/src/logging.cpp b/src/logging.cpp index a352e106e5..1efce21bdb 100644 --- a/src/logging.cpp +++ b/src/logging.cpp @@ -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"}, }; diff --git a/src/logging.h b/src/logging.h index 02e64a7c48..f46104364c 100644 --- a/src/logging.h +++ b/src/logging.h @@ -61,6 +61,7 @@ namespace BCLog { IPC = (1 << 23), LOCK = (1 << 24), UTIL = (1 << 25), + BLOCKSTORE = (1 << 26), ALL = ~(uint32_t)0, }; diff --git a/src/node/blockstorage.cpp b/src/node/blockstorage.cpp index 0b7df9bd9a..bb2acfafe0 100644 --- a/src/node/blockstorage.cpp +++ b/src/node/blockstorage.cpp @@ -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; diff --git a/test/functional/rpc_misc.py b/test/functional/rpc_misc.py index ac2a7a309b..e32e562bce 100755 --- a/test/functional/rpc_misc.py +++ b/test/functional/rpc_misc.py @@ -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) |