Skip to content

Commit 31b2b80

Browse files
committed
blockstorage: use debug log category
1 parent da94ebc commit 31b2b80

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

src/logging.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ const CLogCategoryDesc LogCategories[] =
161161
{BCLog::IPC, "ipc"},
162162
{BCLog::LOCK, "lock"},
163163
{BCLog::UTIL, "util"},
164+
{BCLog::BLOCKSTORE, "blockstorage"},
164165
{BCLog::ALL, "1"},
165166
{BCLog::ALL, "all"},
166167
};

src/logging.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ namespace BCLog {
6161
IPC = (1 << 23),
6262
LOCK = (1 << 24),
6363
UTIL = (1 << 25),
64+
BLOCKSTORE = (1 << 26),
6465
ALL = ~(uint32_t)0,
6566
};
6667

src/node/blockstorage.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ void UnlinkPrunedFiles(const std::set<int>& setFilesToPrune)
204204
FlatFilePos pos(*it, 0);
205205
fs::remove(BlockFileSeq().FileName(pos));
206206
fs::remove(UndoFileSeq().FileName(pos));
207-
LogPrintf("Prune: %s deleted blk/rev (%05u)\n", __func__, *it);
207+
LogPrint(BCLog::BLOCKSTORE, "Prune: %s deleted blk/rev (%05u)\n", __func__, *it);
208208
}
209209
}
210210

@@ -261,7 +261,7 @@ bool FindBlockPos(FlatFilePos& pos, unsigned int nAddSize, unsigned int nHeight,
261261

262262
if ((int)nFile != nLastBlockFile) {
263263
if (!fKnown) {
264-
LogPrint(BCLog::VALIDATION, "Leaving block file %i: %s\n", nLastBlockFile, vinfoBlockFile[nLastBlockFile].ToString());
264+
LogPrint(BCLog::BLOCKSTORE, "Leaving block file %i: %s\n", nLastBlockFile, vinfoBlockFile[nLastBlockFile].ToString());
265265
}
266266
FlushBlockFile(!fKnown, finalize_undo);
267267
nLastBlockFile = nFile;

test/functional/rpc_misc.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ def run_test(self):
5757
self.log.info("test logging rpc and help")
5858

5959
# Test logging RPC returns the expected number of logging categories.
60-
assert_equal(len(node.logging()), 26)
60+
assert_equal(len(node.logging()), 27)
6161

6262
# Test toggling a logging category on/off/on with the logging RPC.
6363
assert_equal(node.logging()['qt'], True)

0 commit comments

Comments
 (0)