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')); |
} |