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

Unified Diff: runtime/observatory/web/main.dart

Issue 2333923007: Improve async stack traces in Observatory (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/observatory/web/main.dart
diff --git a/runtime/observatory/web/main.dart b/runtime/observatory/web/main.dart
index 4f63d25bbea960ec722dd58361f24ac32c3d40a8..b69f66ebf1cd5dde0296e77574658b44b8ba3391 100644
--- a/runtime/observatory/web/main.dart
+++ b/runtime/observatory/web/main.dart
@@ -5,14 +5,17 @@
import 'dart:html';
import 'package:logging/logging.dart';
import 'package:observatory/elements.dart';
+import 'package:stack_trace/stack_trace.dart';
main() async {
- Logger.root.level = Level.INFO;
- Logger.root.onRecord.listen((LogRecord rec) {
- print('${rec.level.name}: ${rec.time}: ${rec.message}');
+ Chain.capture(() async {
+ Logger.root.level = Level.INFO;
+ Logger.root.onRecord.listen((LogRecord rec) {
+ print('${rec.level.name}: ${rec.time}: ${rec.message}');
+ });
+ await initElements();
+ Logger.root.info('Starting Observatory');
+ document.body.children
+ .insert(0, document.createElement('observatory-application'));
});
- await initElements();
- Logger.root.info('Starting Observatory');
- document.body.children
- .insert(0, document.createElement('observatory-application'));
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698