Permalink
Browse files

fix logging to be much more serene in non-verbose mode

  • Loading branch information...
1 parent 03a7c01 commit b0babe2a6020fd61cd6c12d759bec50822f50151 @yyyc514 committed May 5, 2012
Showing with 9 additions and 5 deletions.
  1. +1 −1 lib/sprinkle/installers/installer.rb
  2. +5 −3 lib/sprinkle/package.rb
  3. +2 −0 lib/sprinkle/policy.rb
  4. +1 −1 lib/sprinkle/verify.rb
@@ -113,7 +113,7 @@ def process(roles) #:nodoc:
end
unless Sprinkle::OPTIONS[:testing]
- logger.info "--> Installing #{package.name} for roles: #{roles}"
+ logger.debug " --> Running #{self.class.name} for roles: #{roles}"
@delivery.install(self, roles, :per_host => per_host?)
end
end
View
@@ -190,6 +190,7 @@ def verify(description = '', &block)
end
def process(deployment, roles)
+ logger.info " * #{name}"
return if meta_package?
# Run a pre-test to see if the software is already installed. If so,
@@ -198,7 +199,7 @@ def process(deployment, roles)
begin
process_verifications(deployment, roles, true)
- logger.info "--> #{self.name} already installed for roles: #{roles}"
+ logger.info " --> already installed for roles: #{roles}"
return
rescue Sprinkle::VerificationFailed => e
# Continue
@@ -211,15 +212,16 @@ def process(deployment, roles)
end
process_verifications(deployment, roles)
+ logger.info " --> INSTALLED for roles: #{roles}"
end
def process_verifications(deployment, roles, pre = false)
return if @verifications.blank?
if pre
- logger.info "--> Checking if #{self.name} is already installed for roles: #{roles}"
+ logger.debug "--> Checking if #{self.name} is already installed for roles: #{roles}"
else
- logger.info "--> Verifying #{self.name} was properly installed for roles: #{roles}"
+ logger.debug "--> Verifying #{self.name} was properly installed for roles: #{roles}"
end
@verifications.each do |v|
View
@@ -74,6 +74,8 @@ def to_s; name; end
def process(deployment)
all = []
+
+ logger.info "[#{name}]"
cloud_info "--> Cloud hierarchy for policy #{@name}"
View
@@ -91,7 +91,7 @@ def process(roles, pre = false) #:nodoc:
end
unless Sprinkle::OPTIONS[:testing]
- logger.info "#{" " * @options[:padding]}--> Verifying #{description}..."
+ logger.debug "#{" " * @options[:padding]}--> Verifying #{description}..."
unless @delivery.verify(self, roles)
# Verification failed, halt sprinkling gracefully.

0 comments on commit b0babe2

Please sign in to comment.