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

Unified Diff: pkg/barback/lib/src/group_runner.dart

Issue 26572010: Improve barback/pub logging. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Add missing file. Created 7 years, 2 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
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);
}
}

Powered by Google App Engine
This is Rietveld 408576698