Skip to content

Commit

Permalink
Fix printer queueOp/journalOp record caption to be the same as for me…
Browse files Browse the repository at this point in the history
…ssage record

Signed-off-by: Aleksandr Ivanov <[email protected]>
  • Loading branch information
alexander-e1off committed Dec 19, 2024
1 parent b09207a commit 50056ec
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions src/applications/bmqstoragetool/m_bmqstoragetool_searchresult.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -687,9 +687,12 @@ bool SearchDetailResult::processQueueOpRecord(
record.queueKey());
bmqp_ctrlmsg::QueueInfo* queueInfo_p = queueInfoPresent ? &queueInfo : 0;

d_ostream << "Record index: " << recordIndex
<< ", offset: " << recordOffset << '\n'
<< mqbs::RecordType::e_QUEUE_OP << " Record:" << '\n';
bmqu::MemOutStream ss(d_allocator_p);
ss << mqbs::RecordType::e_QUEUE_OP << " record, index: " << recordIndex
<< ", offset: " << recordOffset;
bsl::string delimiter(ss.length(), '=', d_allocator_p);
d_ostream << delimiter << '\n' << ss.str() << '\n';

RecordPrinter::printRecord(d_ostream, record, queueInfo_p, d_allocator_p);

d_printedQueueOpCount++;
Expand All @@ -702,9 +705,12 @@ bool SearchDetailResult::processJournalOpRecord(
BSLS_ANNOTATION_UNUSED bsls::Types::Uint64 recordIndex,
BSLS_ANNOTATION_UNUSED bsls::Types::Uint64 recordOffset)
{
d_ostream << "Record index: " << recordIndex
<< ", offset: " << recordOffset << '\n'
<< mqbs::RecordType::e_JOURNAL_OP << " Record:" << '\n';
bmqu::MemOutStream ss(d_allocator_p);
ss << mqbs::RecordType::e_JOURNAL_OP << " record, index: " << recordIndex
<< ", offset: " << recordOffset;
bsl::string delimiter(ss.length(), '=', d_allocator_p);
d_ostream << delimiter << '\n' << ss.str() << '\n';

mqbs::FileStoreProtocolPrinter::printRecord(d_ostream, record);

d_printedJournalOpCount++;
Expand Down

0 comments on commit 50056ec

Please sign in to comment.