From fd3c1c6ebb125923e53edc8c95eab1ddc7d8d233 Mon Sep 17 00:00:00 2001 From: Seth Vargo Date: Sun, 4 Jan 2015 18:06:05 -0500 Subject: [PATCH] Add a logger when uploading to FTP --- plugins/pushes/ftp/push.rb | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/pushes/ftp/push.rb b/plugins/pushes/ftp/push.rb index 4cf81cda6..d153ae778 100644 --- a/plugins/pushes/ftp/push.rb +++ b/plugins/pushes/ftp/push.rb @@ -9,6 +9,11 @@ module VagrantPlugins IGNORED_FILES = %w(. ..).freeze DEFAULT_EXCLUDES = %w(.git .hg .svn .vagrant).freeze + def initialize(*) + super + @logger = Log4r::Logger.new("vagrant::pushes::ftp") + end + def push # Grab files early so if there's an exception or issue, we don't have to # wait and close the (S)FTP connection as well @@ -20,6 +25,7 @@ module VagrantPlugins connect do |ftp| files.each do |local, remote| + @logger.info "Uploading #{local} => #{remote}" ftp.upload(local, remote) end end