Print events only when asked.

master
Philippe Pittoli 2023-06-29 23:41:06 +02:00
parent d9b1b623ab
commit 81d34862e2
1 changed files with 4 additions and 4 deletions

View File

@ -121,17 +121,17 @@ class DNSManager::Service < IPC
Baguette::Log.debug "Timer." if @configuration.print_ipc_timer Baguette::Log.debug "Timer." if @configuration.print_ipc_timer
when LibIPC::EventType::Connection when LibIPC::EventType::Connection
Baguette::Log.debug "New connection!" Baguette::Log.debug "New connection!" if @configuration.print_ipc_connection
when LibIPC::EventType::Disconnection when LibIPC::EventType::Disconnection
Baguette::Log.debug "Disconnection from #{event.fd}." Baguette::Log.debug "Disconnection from #{event.fd}." if @configuration.print_ipc_disconnection
@logged_users.delete event.fd @logged_users.delete event.fd
when LibIPC::EventType::MessageTx when LibIPC::EventType::MessageTx
Baguette::Log.debug "Message sent to #{event.fd}." Baguette::Log.debug "Message sent to #{event.fd}." if @configuration.print_ipc_message_sent
when LibIPC::EventType::MessageRx when LibIPC::EventType::MessageRx
Baguette::Log.debug "Message received from #{event.fd}." Baguette::Log.debug "Message received from #{event.fd}." if @configuration.print_ipc_message_received
handle_request event handle_request event
else else