diff options
author | Adam Jacob <adam@opscode.com> | 2010-06-07 13:54:05 -0700 |
---|---|---|
committer | Adam Jacob <adam@opscode.com> | 2010-06-07 13:54:05 -0700 |
commit | c3cc6871e2bdcec60e59dcccdf797fef9bffa0ff (patch) | |
tree | 2c170d5a02c193b261f05622988a9ab19ccde099 /chef/lib/chef/knife/cookbook_upload.rb | |
parent | fbd3fc0c2e32ff1adb4b5d22c1ed16f510eed1a6 (diff) | |
download | chef-c3cc6871e2bdcec60e59dcccdf797fef9bffa0ff.tar.gz |
Adding some more explicit debugging to upload
Diffstat (limited to 'chef/lib/chef/knife/cookbook_upload.rb')
-rw-r--r-- | chef/lib/chef/knife/cookbook_upload.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/chef/lib/chef/knife/cookbook_upload.rb b/chef/lib/chef/knife/cookbook_upload.rb index 7121fbf966..8421dd8868 100644 --- a/chef/lib/chef/knife/cookbook_upload.rb +++ b/chef/lib/chef/knife/cookbook_upload.rb @@ -106,11 +106,12 @@ class Chef checksum_files = build_dir_cookbook.checksums checksums = checksum_files.inject({}){|memo,elt| memo[elt.first]=nil ; memo} new_sandbox = catch_auth_exceptions{ rest.post_rest("/sandboxes", { :checksums => checksums }) } - + + Chef::Log.info("Uploading files") # upload the new checksums and commit the sandbox new_sandbox['checksums'].each do |checksum, info| if info['needs_upload'] == true - Chef::Log.debug("PUTting #{checksum_files[checksum]} (checksum hex = #{checksum}) to #{info['url']}") + Chef::Log.info("Uploading #{checksum_files[checksum]} (checksum hex = #{checksum}) to #{info['url']}") # Checksum is the hexadecimal representation of the md5, # but we need the base64 encoding for the content-md5 @@ -134,6 +135,8 @@ class Chef Chef::Log.error("Upload failed: #{e.message}\n#{e.response.body}") raise end + else + Chef::Log.debug("#{checksum_files[checksum]} has not changed") end end sandbox_url = new_sandbox['uri'] |