Fix infinite loop when logging is enabled on UdpSyslogMessageSender