24#include <seastar/core/format.hh>
25#include <seastar/core/sstring.hh>
26#include <seastar/util/modules.hh>
28#include <fmt/ostream.h>
37operator<<(std::ostream&& os,
const void* ptr) {
42template <
typename Iterator>
43[[deprecated(
"use fmt::join()")]]
45format_separated(Iterator b, Iterator e,
const char* sep =
", ") {
58template <
typename TimePo
int>
63template <
typename TimePo
int>
66usecfmt(TimePoint tp) {
70template <
typename Clock,
typename Rep,
typename Period>
72operator<<(std::ostream& os, usecfmt_wrapper<std::chrono::time_point<Clock, std::chrono::duration<Rep, Period>>> tp) {
73 auto usec = std::chrono::duration_cast<std::chrono::microseconds>(tp.val.time_since_epoch()).count();
74 std::ostream tmp(os.rdbuf());
75 tmp << std::setw(12) << (usec / 1000000) <<
"." << std::setw(6) << std::setfill(
'0') << (usec % 1000000);
79template <
typename... A>
83 print(std::forward<A>(a)...);
88template <
typename... A>
89[[deprecated(
"use std::format() or fmt::print()")]]
91fmt_print(std::ostream& os,
const char*
format, A&&... a) {
92 fmt::print(os,
format, std::forward<A>(a)...);
future now()
Returns a ready future.
Definition: later.hh:35
Seastar API namespace.
Definition: abort_on_ebadf.hh:26
sstring format(fmt::format_string< A... > fmt, A &&... a)
Definition: format.hh:42