add indent and multiline to event marshaling
@@ -344,11 +344,15 @@ func Marshal(msg proto.Message, format string, meta map[string]string, multiline
if err != nil {
return nil, fmt.Errorf("failed converting response to events: %v", err)
}
+ if multiline {
+ b, err = json.MarshalIndent(events, "", indent)
+ } else {
b, err = json.Marshal(events)
+ }
if err != nil {
-
return nil, fmt.Errorf("failed marshaling events: %v", err)
}
+
case *gnmi.SubscribeResponse_SyncResponse:
//c.Logger.Printf("received subscribe syncResponse with %v", meta)
case *gnmi.SubscribeResponse_Error:
