Index: runtime/observatory/lib/src/app/application.dart |
diff --git a/runtime/observatory/lib/src/app/application.dart b/runtime/observatory/lib/src/app/application.dart |
index ea23d604fa59fd53017af2886c7d71028324b9b7..ff4fd3d1000153f938c8d29e2abffe2942ea75e7 100644 |
--- a/runtime/observatory/lib/src/app/application.dart |
+++ b/runtime/observatory/lib/src/app/application.dart |
@@ -54,6 +54,7 @@ class ObservatoryApplication extends Observable { |
} |
StreamSubscription _gcSubscription; |
+ StreamSubscription _loggingSubscription; |
Future startGCEventListener() async { |
if (_gcSubscription != null || _vm == null) { |
@@ -62,6 +63,14 @@ class ObservatoryApplication extends Observable { |
_gcSubscription = await _vm.listenEventStream(VM.kGCStream, _onEvent); |
} |
+ Future startLoggingEventListener() async { |
+ if (_loggingSubscription != null || _vm == null) { |
+ return; |
+ } |
+ _loggingSubscription = |
+ await _vm.listenEventStream(Isolate.kLoggingStream, _onEvent); |
+ } |
+ |
Future stopGCEventListener() async { |
if (_gcSubscription == null) { |
return; |
@@ -70,6 +79,14 @@ class ObservatoryApplication extends Observable { |
_gcSubscription = null; |
} |
+ Future stopLoggingEventListener() async { |
+ if (_loggingSubscription == null) { |
+ return; |
+ } |
+ _loggingSubscription.cancel(); |
+ _loggingSubscription = null; |
+ } |
+ |
@reflectable final ObservatoryApplicationElement rootElement; |
@@ -93,7 +110,6 @@ class ObservatoryApplication extends Observable { |
void _onEvent(ServiceEvent event) { |
assert(event.kind != ServiceEvent.kNone); |
- |
M.Event e = createEventFromServiceEvent(event); |
if (e != null) { |
events.add(e); |