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; |