In the Jitsi project’s Jicofo application, we use the Smack SmackDebugger class to listen for all XMPP traffic, and optionally log it. We subclass AbstractDebugger to do this.
To make the log cleaner and only log complete stanzas we receive, we ignore the output that’s produced by the getReader() reader (raw reads/writes), and instead log the output produced by getReaderListener() reader (complete stanzas).
However, this reader does not receive IQ request stanzas. It appears this is because the API is written as a Smack StanzaListener, and Smack’s AbstractXMPPConnection API has explicit code that blocks this:
// The following returns makes it impossible for packet listeners and collectors to
// filter for IQ request stanzas, i.e. IQs of type 'set' or 'get'. This is the
// desired behavior.
Is this really the desired behavior for the SmackDebugger? If so, why? If not, can it be fixed?
We’re using smack-core 4.2.4 but master appears to be similar.