Skip to content

Commit a87efbf

Browse files
committed
feat(common): make the RPC log even more readable
- Expand google.protobuf.Any payloads rather than printing their serialized content. - Print fields in the order defined in source code instead of by the field number.
1 parent a30eb8b commit a87efbf

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

google/cloud/internal/log_wrapper.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ std::string DebugString(google::protobuf::Message const& m,
3434
p.SetUseShortRepeatedPrimitives(options.use_short_repeated_primitives());
3535
p.SetTruncateStringFieldLongerThan(
3636
options.truncate_string_field_longer_than());
37+
p.SetPrintMessageFieldsInIndexOrder(true);
38+
p.SetExpandAny(true);
3739
p.PrintToString(m, &str);
3840
return absl::StrCat(m.GetTypeName(), " {",
3941
(options.single_line_mode() ? " " : "\n"), str, "}");

0 commit comments

Comments
 (0)