diff --git a/src/mds/LogSegment.h b/src/mds/LogSegment.h index 405760c47a8..0fbb824b348 100644 --- a/src/mds/LogSegment.h +++ b/src/mds/LogSegment.h @@ -106,4 +106,9 @@ class LogSegment { MDSContext::vec expiry_waiters; }; +static inline std::ostream& operator<<(std::ostream& out, const LogSegment& ls) { + return out << "LogSegment(" << ls.seq << "/0x" << std::hex << ls.offset + << std::dec << " events=" << ls.num_events << ")"; +} + #endif