| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 import 'dart:html'; | 5 import 'dart:html'; |
| 6 import 'package:logging/logging.dart'; | 6 import 'package:logging/logging.dart'; |
| 7 import 'package:observatory/elements.dart'; | 7 import 'package:observatory/elements.dart'; |
| 8 import 'package:stack_trace/stack_trace.dart'; | 8 import 'package:stack_trace/stack_trace.dart'; |
| 9 | 9 |
| 10 main() async { | 10 main() async { |
| 11 Chain.capture(() async { | 11 Chain.capture(() async { |
| 12 Logger.root.level = Level.INFO; | 12 Logger.root.level = Level.INFO; |
| 13 Logger.root.onRecord.listen((LogRecord rec) { | 13 Logger.root.onRecord.listen((LogRecord rec) { |
| 14 print('${rec.level.name}: ${rec.time}: ${rec.message}'); | 14 print('${rec.level.name}: ${rec.time}: ${rec.message}'); |
| 15 }); | 15 }); |
| 16 await initElements(); | 16 await initElements(); |
| 17 Logger.root.info('Starting Observatory'); | 17 Logger.root.info('Starting Observatory'); |
| 18 document.body.children | 18 document.body.children |
| 19 .insert(0, document.createElement('observatory-application')); | 19 .insert(0, document.createElement('observatory-application')); |
| 20 }); | 20 }); |
| 21 } | 21 } |
| OLD | NEW |