Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(172)

Unified Diff: runtime/vm/service_event.h

Issue 1241683005: Support piping log data over the service protocol (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/service.cc ('k') | runtime/vm/service_event.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « runtime/vm/service.cc ('k') | runtime/vm/service_event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698