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

Unified Diff: lib/src/report.dart

Issue 1126243004: Summarize only per logging level (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 7 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 | « lib/src/options.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/src/report.dart
diff --git a/lib/src/report.dart b/lib/src/report.dart
index f76d61fd4b5344f54abbf92823c8a2a18f320123..de23525784ae2b6b3eaf5c20be5a0b4c87e6e9cf 100644
--- a/lib/src/report.dart
+++ b/lib/src/report.dart
@@ -124,6 +124,9 @@ class SummaryReporter implements CheckerReporter {
GlobalSummary result = new GlobalSummary();
IndividualSummary _current;
SourceFile _file;
+ final Level _level;
+
+ SummaryReporter([this._level = Level.ALL]);
void enterLibrary(Uri uri) {
var container;
@@ -163,6 +166,8 @@ class SummaryReporter implements CheckerReporter {
}
void log(Message message) {
+ // Only summarize messages per configured logging level
+ if (message.level < _level) return;
assert(message is MessageWithSpan || _file != null);
// TODO(sigmund): convert to use span information from AST (issue #73)
final span = message is MessageWithSpan
« no previous file with comments | « lib/src/options.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698