OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 library compiler; | 5 library compiler; |
6 | 6 |
7 import 'dart:async'; | 7 import 'dart:async'; |
8 import 'dart:collection' show SplayTreeMap; | 8 import 'dart:collection' show SplayTreeMap; |
9 import 'dart:json' as json; | 9 import 'dart:json' as json; |
10 import 'package:analyzer_experimental/src/generated/ast.dart' show Directive, Ur
iBasedDirective; | 10 import 'package:analyzer_experimental/src/generated/ast.dart' show Directive, Ur
iBasedDirective; |
(...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
805 } | 805 } |
806 | 806 |
807 /** | 807 /** |
808 * The code that will be used to bootstrap the application, this is inlined in | 808 * The code that will be used to bootstrap the application, this is inlined in |
809 * the main.html.html output file. | 809 * the main.html.html output file. |
810 */ | 810 */ |
811 String _bootstrapCode(String userMainImport, bool useObservers) => """ | 811 String _bootstrapCode(String userMainImport, bool useObservers) => """ |
812 library bootstrap; | 812 library bootstrap; |
813 | 813 |
814 import 'package:web_ui/watcher.dart' as watcher; | 814 import 'package:web_ui/watcher.dart' as watcher; |
| 815 import 'package:logging/logging.dart'; |
815 import '$userMainImport' as userMain; | 816 import '$userMainImport' as userMain; |
816 | 817 |
817 main() { | 818 main() { |
818 watcher.useObservers = $useObservers; | 819 watcher.useObservers = $useObservers; |
| 820 Logger.root.onRecord.listen((record) { |
| 821 print('\${record.level.name.toLowerCase()}: \${record.message}'); |
| 822 }); |
819 userMain.main(); | 823 userMain.main(); |
820 userMain.init_autogenerated(); | 824 userMain.init_autogenerated(); |
821 } | 825 } |
822 """; | 826 """; |
OLD | NEW |