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