Improved logging

This commit is contained in:
Fabio Rehm 2014-02-01 18:13:42 -02:00
parent dc2cb5eb79
commit a8963c3741
2 changed files with 4 additions and 3 deletions

View file

@ -56,7 +56,7 @@ module VagrantPlugins
def remove_symlink(symlink) def remove_symlink(symlink)
if @machine.communicate.test("test -L #{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}") @machine.communicate.sudo("unlink #{symlink}")
end end
end end

View file

@ -5,7 +5,8 @@ module VagrantPlugins
class Action class Action
class InstallBuckets class InstallBuckets
def initialize(app, env) def initialize(app, env)
@app = app @app = app
@logger = Log4r::Logger.new("vagrant::cachier::action::clean")
end end
def call(env) def call(env)
@ -26,7 +27,7 @@ module VagrantPlugins
env[:ui].info 'Configuring cache buckets...' env[:ui].info 'Configuring cache buckets...'
cache_config = env[:machine].config.cache cache_config = env[:machine].config.cache
cache_config.buckets.each do |bucket_name, configs| 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) Bucket.install(bucket_name, env, configs)
end end