From a8963c374101065c93005f26074e4f1aba322bfe Mon Sep 17 00:00:00 2001 From: Fabio Rehm Date: Sat, 1 Feb 2014 18:13:42 -0200 Subject: [PATCH] Improved logging --- lib/vagrant-cachier/action/clean.rb | 2 +- lib/vagrant-cachier/action/install_buckets.rb | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/vagrant-cachier/action/clean.rb b/lib/vagrant-cachier/action/clean.rb index a2015bf..a908bff 100644 --- a/lib/vagrant-cachier/action/clean.rb +++ b/lib/vagrant-cachier/action/clean.rb @@ -56,7 +56,7 @@ module VagrantPlugins def remove_symlink(symlink) if @machine.communicate.test("test -L #{symlink}") - @logger.debug "Removing symlink for '#{symlink}'" + @logger.info "Removing symlink for '#{symlink}'" @machine.communicate.sudo("unlink #{symlink}") end end diff --git a/lib/vagrant-cachier/action/install_buckets.rb b/lib/vagrant-cachier/action/install_buckets.rb index 0114fb8..94025bd 100644 --- a/lib/vagrant-cachier/action/install_buckets.rb +++ b/lib/vagrant-cachier/action/install_buckets.rb @@ -5,7 +5,8 @@ module VagrantPlugins class Action class InstallBuckets def initialize(app, env) - @app = app + @app = app + @logger = Log4r::Logger.new("vagrant::cachier::action::clean") end def call(env) @@ -26,7 +27,7 @@ module VagrantPlugins env[:ui].info 'Configuring cache buckets...' cache_config = env[:machine].config.cache cache_config.buckets.each do |bucket_name, configs| - # cachier_debug "Installing #{bucket_name} with configs #{configs.inspect}" + @logger.info "Installing #{bucket_name} with configs #{configs.inspect}" Bucket.install(bucket_name, env, configs) end