From 81d34862e29b4901bad4c056cb17f0a62b6dd1fc Mon Sep 17 00:00:00 2001 From: Philippe Pittoli Date: Thu, 29 Jun 2023 23:41:06 +0200 Subject: [PATCH] Print events only when asked. --- src/main.cr | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main.cr b/src/main.cr index 0ae837c..7879cf7 100644 --- a/src/main.cr +++ b/src/main.cr @@ -121,17 +121,17 @@ class DNSManager::Service < IPC Baguette::Log.debug "Timer." if @configuration.print_ipc_timer when LibIPC::EventType::Connection - Baguette::Log.debug "New connection!" + Baguette::Log.debug "New connection!" if @configuration.print_ipc_connection 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 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 - 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 else