Index: lib/src/messages.dart |
diff --git a/lib/src/messages.dart b/lib/src/messages.dart |
index 42032b3311ea63613b9c584ede5729a31aa2e1a8..5dc62475fe0279207e9abe9ce0e4af461417cf77 100644 |
--- a/lib/src/messages.dart |
+++ b/lib/src/messages.dart |
@@ -6,6 +6,7 @@ library messages; |
import 'dart:json' as json; |
+import 'package:barback/barback.dart' show TransformLogger; |
import 'package:source_maps/span.dart' show Span; |
import 'package:logging/logging.dart' show Level; |
@@ -70,7 +71,7 @@ class Message { |
* This class tracks and prints information, warnings, and errors emitted by the |
* compiler. |
*/ |
-class Messages { |
+class Messages implements TransformLogger { |
final CompilerOptions options; |
final bool shouldPrint; |
@@ -101,7 +102,7 @@ class Messages { |
} |
/** [message] is considered a static compile-time error by the Dart lang. */ |
- void error(String message, Span span) { |
+ void error(String message, [Span span]) { |
var msg = new Message(Level.SEVERE, message, span: span, |
useColors: options.useColors); |
@@ -110,7 +111,7 @@ class Messages { |
} |
/** [message] is considered a type warning by the Dart lang. */ |
- void warning(String message, Span span) { |
+ void warning(String message, [Span span]) { |
if (options.warningsAsErrors) { |
error(message, span); |
} else { |
@@ -134,7 +135,7 @@ class Messages { |
* [message] at [span] will tell the user about what the compiler |
* is doing. |
*/ |
- void info(String message, Span span) { |
+ void info(String message, [Span span]) { |
var msg = new Message(Level.INFO, message, span: span, |
useColors: options.useColors); |