Fix logging of messages that are close to the 8KB datagram limit