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

Unified Diff: lib/src/compiler.dart

Issue 5885170347409408: Add location information to watchers to make them more debuggable. (Closed) Base URL: git@github.com:dart-lang/web-ui.git@master
Patch Set: Created 7 years, 5 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 | lib/templating.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/compiler.dart
diff --git a/lib/src/compiler.dart b/lib/src/compiler.dart
index 0404014bcc34dcd33b6fcda76affdf70a411daa5..65a70e7eded569fa5678579d2be2e7008d4de754 100644
--- a/lib/src/compiler.dart
+++ b/lib/src/compiler.dart
@@ -812,10 +812,14 @@ String _bootstrapCode(String userMainImport, bool useObservers) => """
library bootstrap;
import 'package:web_ui/watcher.dart' as watcher;
+import 'package:logging/logging.dart';
import '$userMainImport' as userMain;
main() {
watcher.useObservers = $useObservers;
+ Logger.root.onRecord.listen((record) {
+ print('\${record.level.name.toLowerCase()}: \${record.message}');
+ });
userMain.main();
userMain.init_autogenerated();
}
« no previous file with comments | « no previous file | lib/templating.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698