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

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

Issue 48993007: Revise barback logging patch. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Revise. 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
« no previous file with comments | « pkg/barback/lib/src/asset_cascade.dart ('k') | pkg/barback/lib/src/barback_logger.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/barback/lib/src/barback.dart
diff --git a/pkg/barback/lib/src/barback.dart b/pkg/barback/lib/src/barback.dart
index 932077ebda261a5866f36b3f3e9f92410302da7e..10273692025c0338b25a27afbbac6a6d8d213611 100644
--- a/pkg/barback/lib/src/barback.dart
+++ b/pkg/barback/lib/src/barback.dart
@@ -9,7 +9,7 @@ import 'dart:async';
import 'asset.dart';
import 'asset_id.dart';
import 'asset_set.dart';
-import 'barback_logger.dart';
+import 'log.dart';
import 'build_result.dart';
import 'errors.dart';
import 'package_graph.dart';
@@ -65,8 +65,14 @@ class Barback {
/// emitted through the [results] stream's error channel.
Stream get errors => _graph.errors;
- Barback(PackageProvider provider, {BarbackLogger logger})
- : _graph = new PackageGraph(provider, logger: logger);
+ /// The stream of [LogEntry] objects used to report transformer log entries.
+ ///
+ /// If this stream has listeners, then log entries will go to that.
+ /// Otherwise, a default logger will display them.
+ Stream<LogEntry> get log => _graph.log;
+
+ Barback(PackageProvider provider)
+ : _graph = new PackageGraph(provider);
/// Gets the asset identified by [id].
///
« no previous file with comments | « pkg/barback/lib/src/asset_cascade.dart ('k') | pkg/barback/lib/src/barback_logger.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698