1#include <userver/proto-structs/json.hpp>
3#include <google/protobuf/json/json.h>
4#include <google/protobuf/message.h>
10logging::LogHelper& LogMessage(logging::LogHelper& h,
const google::protobuf::Message& message) {
11 auto options = google::protobuf::json::PrintOptions();
12 options.always_print_primitive_fields =
true;
13 options.preserve_proto_field_names =
true;
16 const auto status = google::protobuf::json::MessageToJsonString(message, &out, options);
20 return h <<
"Failed to log struct: " << status;