| 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:polymer/polymer.dart'; |  | 
| 8 import 'package:observatory/elements.dart'; | 7 import 'package:observatory/elements.dart'; | 
| 9 | 8 | 
| 10 main() async { | 9 main() async { | 
| 11   Logger.root.level = Level.INFO; | 10   Logger.root.level = Level.INFO; | 
| 12   Logger.root.onRecord.listen((LogRecord rec) { | 11   Logger.root.onRecord.listen((LogRecord rec) { | 
| 13       if (rec.level == Level.WARNING && |  | 
| 14           rec.message.startsWith('Error evaluating expression') && |  | 
| 15           (rec.message.contains("Can't assign to null: ") || |  | 
| 16            rec.message.contains('Expression is not assignable: '))) { |  | 
| 17         // Suppress flaky polymer errors. |  | 
| 18         return; |  | 
| 19       } |  | 
| 20       print('${rec.level.name}: ${rec.time}: ${rec.message}'); | 12       print('${rec.level.name}: ${rec.time}: ${rec.message}'); | 
| 21   }); | 13   }); | 
| 22   await initElements(); | 14   await initElements(); | 
| 23   Logger.root.info('Starting Observatory'); | 15   Logger.root.info('Starting Observatory'); | 
| 24   await initPolymer(); |  | 
| 25   Logger.root.info('Polymer initialized'); |  | 
| 26   await Polymer.onReady; |  | 
| 27   Logger.root.info('Polymer elements have been upgraded'); |  | 
| 28   document.body.children | 16   document.body.children | 
| 29       .insert(0, document.createElement('observatory-application')); | 17       .insert(0, document.createElement('observatory-application')); | 
| 30 } | 18 } | 
| OLD | NEW | 
|---|