Skip to content

Commit 1c2049d

Browse files
committed
MB-16181: Tweak logging to use 0x prefixes
Make the logging friendlier to humans and prefix the hexadecimal IDs with 0x. Change-Id: Ib097ac50734c8fb817da6049ed1b63eaa8365398 Reviewed-on: http://review.couchbase.org/c/kv_engine/+/133736 Reviewed-by: Richard de Mellow <[email protected]> Tested-by: Jim Walker <[email protected]>
1 parent 564e310 commit 1c2049d

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

engines/ep/src/collections/manager.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ cb::engine_error Collections::Manager::update(KVBucket& bucket,
6161
// Bad - newManifest has a lower UID
6262
EP_LOG_WARN(
6363
"Collections::Manager::update the new manifest has "
64-
"UID < current manifest UID. Current UID:{}, New "
64+
"UID < current manifest UID. Current UID:{:#x}, New "
6565
"Manifest:{}",
6666
current->getUid(),
6767
std::string(manifest));

engines/ep/src/collections/vbucket_manifest.cc

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -253,10 +253,10 @@ void Manifest::addCollection(const WriteHandle& wHandle,
253253
optionalSeqno);
254254

255255
EP_LOG_INFO(
256-
"collections: {} adding collection:[name:{},id:{:x}] to "
257-
"scope:{:x}, "
256+
"collections: {} adding collection:[name:{},id:{:#x}] to "
257+
"scope:{:#x}, "
258258
"maxTTL:{} {}, "
259-
"replica:{}, seqno:{}, manifest:{:x}",
259+
"replica:{}, seqno:{}, manifest:{:#x}",
260260
vb.getId(),
261261
collectionName,
262262
identifiers.second,
@@ -334,8 +334,8 @@ void Manifest::dropCollection(const WriteHandle& wHandle,
334334
optionalSeqno);
335335

336336
EP_LOG_INFO(
337-
"collections: {} drop of collection:{:x} from scope:{:x}"
338-
", replica:{}, seqno:{}, manifest:{:x} tombstone:{}",
337+
"collections: {} drop of collection:{:#x} from scope:{:#x}"
338+
", replica:{}, seqno:{}, manifest:{:#x} tombstone:{}",
339339
vb.getId(),
340340
cid,
341341
itr->second.getScopeID(),
@@ -391,8 +391,8 @@ void Manifest::addScope(const WriteHandle& wHandle,
391391
vb.addSystemEventItem(item.release(), optionalSeqno, {}, wHandle);
392392

393393
EP_LOG_INFO(
394-
"collections: {} added scope:name:{},id:{:x} "
395-
"replica:{}, seqno:{}, manifest:{:x}",
394+
"collections: {} added scope:name:{},id:{:#x} "
395+
"replica:{}, seqno:{}, manifest:{:#x}",
396396
vb.getId(),
397397
scopeName,
398398
sid,
@@ -445,8 +445,8 @@ void Manifest::dropScope(const WriteHandle& wHandle,
445445
}
446446

447447
EP_LOG_INFO(
448-
"collections: {} dropped scope:id:{:x} "
449-
"replica:{}, seqno:{}, manifest:{:x}",
448+
"collections: {} dropped scope:id:{:#x} "
449+
"replica:{}, seqno:{}, manifest:{:#x}",
450450
vb.getId(),
451451
sid,
452452
optionalSeqno.has_value(),

0 commit comments

Comments
 (0)