Don't print KeepAlive messages by default.
This commit is contained in:
parent
2b3fe276a5
commit
a708d8fc46
10
src/main.cr
10
src/main.cr
@ -76,7 +76,9 @@ class DNSManager::Service < IPC
|
||||
end
|
||||
|
||||
reqname = request.class.name.sub /^DNSManager::Request::/, ""
|
||||
Baguette::Log.debug "<< #{reqname}"
|
||||
if reqname != "KeepAlive" || @configuration.print_keepalive
|
||||
Baguette::Log.debug "<< #{reqname}"
|
||||
end
|
||||
|
||||
response = begin
|
||||
request.handle self, event
|
||||
@ -105,9 +107,11 @@ class DNSManager::Service < IPC
|
||||
response_name = response.class.name.sub /^DNSManager::Response::/, ""
|
||||
|
||||
if response.is_a? DNSManager::Response::Error
|
||||
Baguette::Log.warning ">> #{response_name} (#{response.reason})"
|
||||
Baguette::Log.warning ">> #{response_name} (#{response.reason}) (Total duration: #{duration})"
|
||||
else
|
||||
Baguette::Log.debug ">> #{response_name} (Total duration: #{duration})"
|
||||
if reqname != "KeepAlive" || @configuration.print_keepalive
|
||||
Baguette::Log.debug ">> #{response_name} (Total duration: #{duration})"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user