Skip to content

Commit ce5d84d

Browse files
committed
osdc: add print method for Journaler::Header
For dout prints. Signed-off-by: Patrick Donnelly <[email protected]>
1 parent 98b7402 commit ce5d84d

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/osdc/Journaler.h

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,16 @@ class Journaler {
186186
f->close_section(); // journal_header
187187
}
188188

189+
void print(std::ostream& os) const {
190+
os << std::hex
191+
<< "Journaler::Header"
192+
"(t=" << trimmed_pos
193+
<< " e=" << expire_pos
194+
<< " w=" << write_pos
195+
<< ")"
196+
<< std::dec;
197+
}
198+
189199
static void generate_test_instances(std::list<Header*> &ls)
190200
{
191201
ls.push_back(new Header());

0 commit comments

Comments
 (0)