Index: pkg/barback/lib/src/group_runner.dart |
diff --git a/pkg/barback/lib/src/group_runner.dart b/pkg/barback/lib/src/group_runner.dart |
index 2bb1e117d7381e0d445070a83fd10958d2cf7b06..5551e47c2316bb7ef06c2225b9483ddd4d5778dd 100644 |
--- a/pkg/barback/lib/src/group_runner.dart |
+++ b/pkg/barback/lib/src/group_runner.dart |
@@ -8,6 +8,7 @@ import 'dart:async'; |
import 'asset_cascade.dart'; |
import 'asset_node.dart'; |
+import 'barback_logger.dart'; |
import 'phase.dart'; |
import 'stream_pool.dart'; |
import 'transformer_group.dart'; |
@@ -31,6 +32,11 @@ class GroupRunner { |
/// Whether this group is dirty and needs to be run. |
bool get isDirty => _phases.any((phase) => phase.isDirty); |
+ /// A stream that emits an event whenever any transforms in this group log an |
nweiz
2013/10/16 19:41:27
"log" -> "logs"
Bob Nystrom
2013/10/28 23:45:56
Done.
|
+ /// entry. |
+ Stream<LogEntry> get onLog => _onLogPool.stream; |
+ final _onLogPool = new StreamPool<LogEntry>.broadcast(); |
+ |
// TODO(nweiz): move to a more push-based way of propagating outputs and get |
// rid of this. Once that's done, see if we can unify GroupRunner and |
// AssetCascade. |
@@ -50,6 +56,7 @@ class GroupRunner { |
for (var phase in _phases) { |
_onDirtyPool.add(phase.onDirty); |
+ _onLogPool.add(phase.onLog); |
} |
} |