refactor(dart/transform): Minor logging changes
Enable easier testing by providing a null log implementation and a way to use it.
This commit is contained in:
@ -10,6 +10,11 @@ void init(Transform t) {
|
||||
_logger = new BuildLogger(t);
|
||||
}
|
||||
|
||||
/// Sets [logger] directly. Used for testing - in general use [init].
|
||||
void setLogger(BuildLogger logger) {
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
/// The logger the transformer should use for messaging.
|
||||
BuildLogger get logger {
|
||||
if (_logger == null) {
|
||||
|
Reference in New Issue
Block a user