Index: runtime/vm/service_event.h |
diff --git a/runtime/vm/service_event.h b/runtime/vm/service_event.h |
index 8f81da5b33c38952baf917dd44bdeecc2637df91..6ebc2118b5e06106e4f2ced7707c13b1240ef944 100644 |
--- a/runtime/vm/service_event.h |
+++ b/runtime/vm/service_event.h |
@@ -34,9 +34,22 @@ class ServiceEvent { |
kEmbedder, |
+ kLogging, |
+ |
kIllegal, |
}; |
+ struct LogRecord { |
+ int64_t sequence_number; |
+ int64_t timestamp; |
+ intptr_t level; |
+ const String* name; |
+ const String* message; |
+ const Instance* zone; |
+ const Object* error; |
+ const Instance* stack_trace; |
+ }; |
+ |
ServiceEvent(Isolate* isolate, EventKind event_kind) |
: isolate_(isolate), |
kind_(event_kind), |
@@ -138,8 +151,14 @@ class ServiceEvent { |
bytes_length_ = bytes_length; |
} |
+ void set_log_record(const LogRecord& log_record) { |
+ log_record_ = log_record; |
+ } |
+ |
void PrintJSON(JSONStream* js) const; |
+ void PrintJSONHeader(JSONObject* jsobj) const; |
+ |
private: |
Isolate* isolate_; |
EventKind kind_; |
@@ -153,6 +172,7 @@ class ServiceEvent { |
const Heap::GCStats* gc_stats_; |
const uint8_t* bytes_; |
intptr_t bytes_length_; |
+ LogRecord log_record_; |
}; |
} // namespace dart |