A patch that adds a custom logger that can be used to log all outgoing and incoming dns packets for TCPClient and UDPClient.
In Jitsi we already have a packet logging service for SIP, XMPP, ICE and for RTP packets, We also applied the following patch to add this functionality and for DNS packets. The produced pcap file is a quick way of debugging client problems.
It also can be used to plug a logger for the traffic exchanged with the server, including retransmissions.
Committed, with a few minor changes. I changed the interface name from CustomLogger to PacketLogger, since it's logging packets, and changed the signature to put the user-specified prefix first, rather than in the middle.
Ticket moved from /p/dnsjava/patches/22/