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

Unified Diff: utils/pub/command_lish.dart

Issue 11470031: Finish integrating logging. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Respond to review. Created 8 years 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 | « no previous file | utils/pub/curl_client.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: utils/pub/command_lish.dart
diff --git a/utils/pub/command_lish.dart b/utils/pub/command_lish.dart
index 3895232a1cffaba57cfbd0265845831d5fa9eb7b..b48552f8bd5bb8dcb427b3d0bf1ea36ae46dbda7 100644
--- a/utils/pub/command_lish.dart
+++ b/utils/pub/command_lish.dart
@@ -10,10 +10,11 @@ import 'dart:uri';
import '../../pkg/args/lib/args.dart';
import '../../pkg/http/lib/http.dart' as http;
-import 'pub.dart';
-import 'io.dart';
import 'git.dart' as git;
+import 'io.dart';
+import 'log.dart' as log;
import 'oauth2.dart' as oauth2;
+import 'pub.dart';
import 'validator.dart';
// TODO(nweiz): Make "publish" the primary name for this command. See issue
@@ -42,6 +43,7 @@ class LishCommand extends PubCommand {
return Futures.wait([
client.get(server.resolve("/packages/versions/new.json")),
_filesToPublish.transform((files) {
+ log.fine('Archiving and publishing ${entrypoint.root}.');
return createTarGz(files, baseDir: entrypoint.root.dir);
}).chain(consumeInputStream),
_validate()
@@ -77,7 +79,7 @@ class LishCommand extends PubCommand {
parsed['success']['message'] is! String) {
_invalidServerResponse(response);
}
- print(parsed['success']['message']);
+ log.message(parsed['success']['message']);
});
}).transformException((e) {
if (e is PubHttpException) {
@@ -97,13 +99,13 @@ class LishCommand extends PubCommand {
throw errorMap['error']['message'];
}
} else if (e is oauth2.ExpirationException) {
- printError("Pub's authorization to upload packages has expired and "
+ log.error("Pub's authorization to upload packages has expired and "
"can't be automatically refreshed.");
return onRun();
} else if (e is oauth2.AuthorizationException) {
var message = "OAuth2 authorization failed";
if (e.description != null) message = "$message (${e.description})";
- printError("$message.");
+ log.error("$message.");
return oauth2.clearCredentials(cache).chain((_) => onRun());
} else {
throw e;
« no previous file with comments | « no previous file | utils/pub/curl_client.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698