Do not print KeepAlive messages by default.

This commit is contained in:
Philippe Pittoli 2024-02-20 23:24:52 +01:00
parent 4c07699082
commit 4b21c8bec1

View File

@ -112,7 +112,9 @@ class AuthD::Service < IPC
end
request_name = request.class.name.sub /^AuthD::Request::/, ""
Baguette::Log.debug "<< #{request_name} (FROM: #{event.fd})"
if request_name != "KeepAlive" || @configuration.print_keepalive
Baguette::Log.debug "<< #{request_name} (FROM: #{event.fd})"
end
response = begin
request.handle self, event.fd
@ -143,7 +145,9 @@ class AuthD::Service < IPC
if response.is_a? AuthD::Response::Error
Baguette::Log.warning ">> #{response_name} (#{response.reason}) (TO: #{event.fd})"
else
Baguette::Log.debug ">> #{response_name} (TO: #{event.fd}) (Total duration: #{duration})"
if request_name != "KeepAlive" || @configuration.print_keepalive
Baguette::Log.debug ">> #{response_name} (TO: #{event.fd}) (Total duration: #{duration})"
end
end
end