coderanger / kitchen-sync

Test Kitchen transport plugin to speed up tests.
Apache License 2.0
81 stars 24 forks source link

Quiet "time taken to upload" output? #33

Open jayhendren opened 7 years ago

jayhendren commented 7 years ago

When uploading files with the SFTP transporter, my testkitchen output gets polluted with a lot of this kind of stuff:

       Transferring files to <default-cub-rh7>
       [SFTP] Time taken to upload /tmp/default-cub-rh7-sandbox-20170421-28438-1s6o5ur/policy to vagrant@127.0.0.1<{:user_known_hosts_file=>"/dev/null", :paranoid=>false, :port=>"2200", :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :timeout=>15, :keys_only=>true, :keys=>["/home/jay/local/data/sis/git/cookbooks/CF-325/cub_epel/.kitchen/kitchen-vagrant/kitchen-cub_epel-default-cub-rh7/.vagrant/machines/default/virtualbox/private_key"], :auth_methods=>["publickey"], :logger=>#<Logger:0x0000000384a000 @progname=nil, @level=4, @default_formatter=#<Logger::Formatter:0x00000003849fd8 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x00000003849f88 @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDERR>>, @mon_owner=nil, @mon_count=0, @mon_mutex=#<Thread::Mutex:0x00000003849f60>>>, :password_prompt=>#<Net::SSH::Prompt:0x00000003849f38>, :user=>"vagrant"}>:/tmp/verifier/policy: 0.51 sec
       [SFTP] Time taken to upload /tmp/default-cub-rh7-sandbox-20170421-28438-1s6o5ur/suites to vagrant@127.0.0.1<{:user_known_hosts_file=>"/dev/null", :paranoid=>false, :port=>"2200", :compression=>false, :compression_level=>0, :keepalive=>true, :keepalive_interval=>60, :timeout=>15, :keys_only=>true, :keys=>["/home/jay/local/data/sis/git/cookbooks/CF-325/cub_epel/.kitchen/kitchen-vagrant/kitchen-cub_epel-default-cub-rh7/.vagrant/machines/default/virtualbox/private_key"], :auth_methods=>["publickey"], :logger=>#<Logger:0x0000000384a000 @progname=nil, @level=4, @default_formatter=#<Logger::Formatter:0x00000003849fd8 @datetime_format=nil>, @formatter=nil, @logdev=#<Logger::LogDevice:0x00000003849f88 @shift_size=nil, @shift_age=nil, @filename=nil, @dev=#<IO:<STDERR>>, @mon_owner=nil, @mon_count=0, @mon_mutex=#<Thread::Mutex:0x00000003849f60>>>, :password_prompt=>#<Net::SSH::Prompt:0x00000003849f38>, :user=>"vagrant"}>:/tmp/verifier/suites: 0.09 sec

Should this perhaps be debug output instead of info output?

coderanger commented 7 years ago

Eh, given the kind of nonsense in a normal kitchen output, this never really bothered me much.

izinovik commented 7 years ago

BTW, even if I explicitly set log_level in transport section I still see that kitchen-sync pollutes output of converge stage:

.kitchen.yml
transport:
  name: sftp
  log_level: error
lehn-etracker commented 7 years ago

kitchen-sync seems to have a bug with reading log_level properties. There is no way to change that value. See kitchen diagnose and you will see, that log_level is always :info no matter what you've set in .kitchen.yml.

coderanger commented 7 years ago

There is not currently any such thing as a log level setting for the transport, but there could be.

logicminds commented 4 years ago

Eh, given the kind of nonsense in a normal kitchen output, this never really bothered me much.

This is not normal kitchen output. What other output shows ruby object level details as part of normal output?. This is debug level information and should be classified accordingly.

Noel-Jones commented 4 years ago

Eh, given the kind of nonsense in a normal kitchen output, this never really bothered me much.

Yes but the normal output is useful in debugging my recipes. The 10 lines of SFT information is only useful in debugging this Gem. It's enough to make me simply not use it.