Skip to content

Commit

Permalink
#735 more logs
Browse files Browse the repository at this point in the history
  • Loading branch information
yegor256 committed Mar 22, 2019
1 parent 8b61658 commit ea849c1
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions lib/zold/commands/remote.rb
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,8 @@ def trim(opts)
@remotes.remove(r[:host], r[:port]) if !opts['masters-too'] || !r[:master]
@log.debug("#{r[:host]}:#{r[:port]} removed because of #{r[:errors]} errors (over #{opts['tolerate']})")
end
@log.info("The list of #{all.count} remotes trimmed down to #{@remotes.all.count} nodes")
@log.info("The list of #{all.count} remotes trimmed down to #{@remotes.all.count} nodes \
(#{@remotes.all.count { |r| r[:master] }} masters)")
end

def update(opts)
Expand Down Expand Up @@ -299,7 +300,9 @@ def update(opts)
if total.zero?
@log.info("The list of remotes is #{Rainbow('empty').red}, run 'zold remote reset'!")
else
@log.info("There are #{total} known remotes with the overall score of \
@log.info("There are #{total} known remotes \
(#{@remotes.all.count { |r| r[:master] }} masters) \
with the overall score of \
#{@remotes.all.map { |r| r[:score] }.inject(&:+)}, after update in #{Age.new(st)}")
end
end
Expand Down Expand Up @@ -354,7 +357,8 @@ def select(opts)
@remotes.remove(r[:host], r[:port])
@log.debug("Remote #{r[:host]}:#{r[:port]}/#{r[:score]}/#{r[:errors]}e removed from the list")
end
@log.info("#{@remotes.all.count} best remote nodes were selected to stay in the list")
@log.info("#{@remotes.all.count} best remote nodes were selected to stay in the list \
(#{@remotes.all.count { |r| r[:master] }} masters)")
end

def terminate
Expand Down

0 comments on commit ea849c1

Please sign in to comment.