Signed-off-by: Ronen Friedman <rfriedma@redhat.com>
}
};
WRITE_CLASS_ENCODER(pg_log_op_return_item_t)
+namespace fmt {
+template <>
+struct formatter<pg_log_op_return_item_t> {
+ constexpr auto parse(fmt::format_parse_context& ctx) { return ctx.begin(); }
+ template <typename FormatContext>
+ auto format(const pg_log_op_return_item_t& litm, FormatContext& ctx) const {
+ return fmt::format_to(ctx.out(), "r={}+{}b", litm.rval, litm.bl.length());
+ }
+};
+} // namespace fmt
/**
* pg_log_entry_t - single entry/event in pg log
};
#if FMT_VERSION >= 90000
-template <> struct fmt::formatter<pg_log_op_return_item_t> : fmt::ostream_formatter {};
template <> struct fmt::formatter<watch_info_t> : fmt::ostream_formatter {};
template <bool TrackChanges> struct fmt::formatter<pg_missing_set<TrackChanges>> : fmt::ostream_formatter {};
#endif