userver: userver/ugrpc/protobuf_logging.hpp File Reference
Loading...
Searching...
No Matches
protobuf_logging.hpp File Reference

Detailed Description

Public API for protobuf logging utilities.

Definition in file protobuf_logging.hpp.

Go to the source code of this file.

#include <fmt/format.h>
#include <google/protobuf/message.h>
#include <grpcpp/support/status.h>

Classes

struct  fmt::formatter< T, typename std::enable_if_t< std::is_base_of_v< google::protobuf::Message, std::decay_t< T > >, char > >
 fmt::format support for protobuf messages More...
 

Namespaces

namespace  ugrpc
 Asynchronous gRPC driver.
 

Functions

std::string ugrpc::ToLimitedDebugString (const google::protobuf::Message &message, std::size_t limit)
 Convert protobuf message to limited debug string for logging.
 
std::string ugrpc::ToUnlimitedDebugString (const google::protobuf::Message &message)
 Convert protobuf message to unlimited debug string for logging.
 
std::string ugrpc::ToLimitedDebugString (const grpc::Status &status, std::size_t max_size=kDefaultDebugStringLimit)
 Get error details from grpc::Status for logging with size limit.
 
std::string ugrpc::ToUnlimitedDebugString (const grpc::Status &status)
 Get error details from grpc::Status for logging without size limit.
 

Variables

constexpr std::size_t ugrpc::kDefaultDebugStringLimit = 1024