Index: runtime/vm/service_event.cc |
diff --git a/runtime/vm/service_event.cc b/runtime/vm/service_event.cc |
index a53ace2d9343db46582249460aef121a31a817ad..da211eb1864cd74c3d3331ac4c14b4c5bf6c5777 100644 |
--- a/runtime/vm/service_event.cc |
+++ b/runtime/vm/service_event.cc |
@@ -89,6 +89,8 @@ const char* ServiceEvent::KindAsCString() const { |
return "Inspect"; |
case kEmbedder: |
return embedder_kind(); |
+ case kLogging: |
+ return "Logging"; |
case kDebuggerSettingsUpdate: |
return "_DebuggerSettingsUpdate"; |
case kIllegal: |
@@ -126,6 +128,9 @@ const char* ServiceEvent::stream_id() const { |
case kEmbedder: |
return embedder_stream_id_; |
+ case kLogging: |
+ return Service::logging_stream.id(); |
+ |
default: |
UNREACHABLE(); |
return NULL; |
@@ -135,9 +140,7 @@ const char* ServiceEvent::stream_id() const { |
void ServiceEvent::PrintJSON(JSONStream* js) const { |
JSONObject jsobj(js); |
- jsobj.AddProperty("type", "Event"); |
- jsobj.AddProperty("kind", KindAsCString()); |
- jsobj.AddProperty("isolate", isolate()); |
+ PrintJSONHeader(&jsobj); |
if (kind() == kPauseBreakpoint) { |
JSONArray jsarr(&jsobj, "pauseBreakpoints"); |
// TODO(rmacnak): If we are paused at more than one breakpoint, |
@@ -179,4 +182,12 @@ void ServiceEvent::PrintJSON(JSONStream* js) const { |
} |
} |
+ |
+void ServiceEvent::PrintJSONHeader(JSONObject* jsobj) const { |
+ ASSERT(jsobj != NULL); |
+ jsobj->AddProperty("type", "Event"); |
+ jsobj->AddProperty("kind", KindAsCString()); |
+ jsobj->AddProperty("isolate", isolate()); |
+} |
+ |
} // namespace dart |