7#include <google/protobuf/message.h>
8#include <grpcpp/support/status.h>
10USERVER_NAMESPACE_BEGIN
14inline constexpr std::size_t kDefaultDebugStringLimit = 1024;
61std::string
ToLimitedDebugString(
const grpc::Status& status, std::size_t max_size = kDefaultDebugStringLimit);
81requires std::is_base_of_v<google::protobuf::Message, std::decay_t<T>>
83 constexpr auto parse(format_parse_context& ctx) {
return ctx.begin(); }
85 template <
typename FormatContext>
86 auto format(
const T& message, FormatContext& ctx)
const {
87 return fmt::format_to(
90 USERVER_NAMESPACE::ugrpc::ToLimitedDebugString(message, USERVER_NAMESPACE::ugrpc::kDefaultDebugStringLimit)