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

Unified Diff: utils/pub/command_lish.dart

Issue 11472016: Revert "Add logging system to pub and sprinkle some logging in." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 | « utils/pub/command_install.dart ('k') | utils/pub/command_update.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 89b78685b73dfd214cac402ba1639c4d7cfe63e4..55237e94396c3a46493af4ac5d898adf4f9b1c9e 100644
--- a/utils/pub/command_lish.dart
+++ b/utils/pub/command_lish.dart
@@ -10,11 +10,10 @@ import 'dart:uri';
import '../../pkg/args/lib/args.dart';
import '../../pkg/http/lib/http.dart' as http;
-import 'git.dart' as git;
+import 'pub.dart';
import 'io.dart';
-import 'log.dart' as log;
+import 'git.dart' as git;
import 'oauth2.dart' as oauth2;
-import 'pub.dart';
import 'validator.dart';
// TODO(nweiz): Make "publish" the primary name for this command. See issue
@@ -43,7 +42,6 @@ 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()
@@ -79,7 +77,7 @@ class LishCommand extends PubCommand {
parsed['success']['message'] is! String) {
_invalidServerResponse(response);
}
- log.message(parsed['success']['message']);
+ print(parsed['success']['message']);
});
}).transformException((e) {
if (e is PubHttpException) {
@@ -99,23 +97,17 @@ class LishCommand extends PubCommand {
throw errorMap['error']['message'];
}
} else if (e is oauth2.ExpirationException) {
- log.error("Pub's authorization to upload packages has expired and "
+ printError("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})";
- log.error("$message.");
+ printError("$message.");
return oauth2.clearCredentials(cache).chain((_) => onRun());
} else {
throw e;
}
-
- if (e is! oauth2.ExpirationException) throw e;
-
- log.error("Pub's authorization to upload packages has expired and can't "
- "be automatically refreshed.");
- return onRun();
});
}
« no previous file with comments | « utils/pub/command_install.dart ('k') | utils/pub/command_update.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698