Skip to content

Commit 90b3d7c

Browse files
committed
add debug message
1 parent b16f062 commit 90b3d7c

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

google/cloud/storage/internal/grpc/object_metadata_parser.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,11 @@ storage::ObjectMetadata FromProto(google::storage::v2::Object object,
172172
google::cloud::internal::ToChronoTimePoint(object.hard_delete_time()));
173173
}
174174
if (object.has_contexts()) {
175+
// DEBUG PRINT: Dump the raw protobuf message
176+
// ==========================================
177+
std::cerr << "[DEBUG] Context Proto: '" << object.contexts().DebugString()
178+
<< "'\n";
179+
// ==========================================
175180
storage::ObjectContexts contexts;
176181
for (auto const& kv : object.contexts().custom()) {
177182
storage::ObjectCustomContextPayload payload;

google/cloud/storage/internal/object_metadata_parser.cc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,11 @@ Status ParseContexts(ObjectMetadata& meta, nlohmann::json const& json) {
186186
auto f_contexts = json.find("contexts");
187187
if (f_contexts == json.end()) return Status{};
188188

189+
// DEBUG: Print just the contexts block
190+
std::cout << "========== JSON CONTEXTS BLOCK ==========\n"
191+
<< f_contexts->dump(4)
192+
<< "\n====================================\n";
193+
189194
auto f_custom = f_contexts->find("custom");
190195
if (f_custom == f_contexts->end()) return Status{};
191196

0 commit comments

Comments
 (0)