Skip to content

Commit

Permalink
Use positive word for method name
Browse files Browse the repository at this point in the history
Negative word may confuse with us.
  • Loading branch information
kou committed Mar 20, 2015
1 parent 95ba094 commit c1ff1e5
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions lib/droonga/serf/agent.rb
Expand Up @@ -138,7 +138,7 @@ def on_standard_output(line_buffer, data)
hour, minute, second = $4, $5, $6
level = $7
content = $POSTMATCH
return if suppressed_log_message?(content)
return unless needed_log_message?(content)
level = normalize_level(level)
logger.send(level, content)
else
Expand All @@ -150,16 +150,16 @@ def on_standard_output(line_buffer, data)
end
end

def suppressed_log_message?(content)
def needed_log_message?(content)
case content
when /\Amemberlist: Failed to receive remote state: EOF\z/
# See also: https://github.com/hashicorp/consul/issues/598#issuecomment-71576948
true
false
when /\Aagent: Script .*droonga-engine-serf-event-handler.* slow, execution exceeding/
# Droonga's serf event handler can be slow for absorbing or some operations.
true
else
false
else
true
end
end

Expand Down

0 comments on commit c1ff1e5

Please sign in to comment.