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

Unified Diff: pkg/analyzer/lib/src/analyzer_impl.dart

Issue 196223004: New verbose flag for the dart command line analyzer (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: verbose -> log Created 6 years, 9 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 | « pkg/analyzer/lib/options.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/analyzer/lib/src/analyzer_impl.dart
diff --git a/pkg/analyzer/lib/src/analyzer_impl.dart b/pkg/analyzer/lib/src/analyzer_impl.dart
index a107ef293ff041af7e09b9dba859a09f9d3aa9ef..69685d2a11c11ce8ca8cfbf7b4b5505082eaebdc 100644
--- a/pkg/analyzer/lib/src/analyzer_impl.dart
+++ b/pkg/analyzer/lib/src/analyzer_impl.dart
@@ -159,7 +159,7 @@ class AnalyzerImpl {
context = AnalysisEngine.instance.createAnalysisContext();
context.sourceFactory = sourceFactory;
// Uncomment the following to have errors reported on stdout and stderr
-// AnalysisEngine.instance.logger = new StdLogger();
+ AnalysisEngine.instance.logger = new StdLogger(options.log);
// set options for context
AnalysisOptionsImpl contextOptions = new AnalysisOptionsImpl();
@@ -267,7 +267,10 @@ class AnalyzerImpl {
* to [stderr].
*/
class StdLogger extends Logger {
-
+ final bool log;
+
+ StdLogger(this.log);
+
@override
void logError(String message) {
stderr.writeln(message);
@@ -280,11 +283,15 @@ class StdLogger extends Logger {
@override
void logInformation(String message) {
- stdout.writeln(message);
+ if (log) {
+ stdout.writeln(message);
+ }
}
@override
void logInformation2(String message, Exception exception) {
- stdout.writeln(message);
+ if (log) {
+ stdout.writeln(message);
+ }
}
}
« no previous file with comments | « pkg/analyzer/lib/options.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698