Skip to content
Browse files

Merge pull request #108 from portertech/log

[log] only use + [].join when > two vars
  • Loading branch information...
2 parents a449859 + 60a8f61 commit de30bc03acee59b00712fbc631d8668139470eb3 @portertech portertech committed Nov 28, 2011
Showing with 3 additions and 3 deletions.
  1. +2 −2 lib/sensu/client.rb
  2. +1 −1 lib/sensu/server.rb
View
4 lib/sensu/client.rb
@@ -55,7 +55,7 @@ def setup_keepalives
end
def publish_result(check)
- @logger.info('[result] -- publishing check result -- ' + [check.status.to_s, check.name].join(' -- '))
+ @logger.info('[result] -- publishing check result -- ' + check.status.to_s + ' -- ' + check.name)
@result_queue ||= @amq.queue('results')
@result_queue.publish({
:client => @settings.client.name,
@@ -90,7 +90,7 @@ def execute_check(check)
end
EM.defer(execute, publish)
else
- @logger.warn('[execute] -- missing client attributes -- ' + [unmatched_tokens.join(', '), check.name].join(' -- '))
+ @logger.warn('[execute] -- missing client attributes -- ' + unmatched_tokens.join(', ') + ' -- ' + check.name)
check.status = 3
check.output = 'Missing client attributes: ' + unmatched_tokens.join(', ')
check.internal = true
View
2 lib/sensu/server.rb
@@ -101,7 +101,7 @@ def handle_event(event)
end
def process_result(result)
- @logger.debug('[result] -- processing result for ' + [result.client, result.check.name].join(' -- '))
+ @logger.debug('[result] -- processing result -- ' + result.client + ' -- ' + result.check.name)
@redis.get('client:' + result.client).callback do |client_json|
unless client_json.nil?
client = Hashie::Mash.new(JSON.parse(client_json))

0 comments on commit de30bc0

Please sign in to comment.
Something went wrong with that request. Please try again.