I try to analyze a problem related to XMPP. I have two server components joined the same MUC room on Prosody IM (it's hard to make my application to print those XMPPs they received/sent , i'm using jitsi jicofo and jitsi jigasi).
So, I was wondering if it is possible to print detailed XMPP messages sent/received in MUC.
My prosody logging configuration is as below:
log = {
{ levels = {min = "debug"} , to = "console"};
}
Above configuration gave me log output as follows:
c2s55b17ab56330 debug Received[c2s]: <presence type='unavailable' id='AwXwU-149' to='[email protected]/448ddea4'>
conference.example.com:muc debug session [email protected]/tYARglho is leaving occupant [email protected]/448ddea4
c2s55b17b2a8300 debug Sending[c2s]: <presence from='[email protected]/448ddea4' id='AwXwU-149' type='unavailable' to='[email protected]/9W3u-kLN'>
c2s55b17ae40d40 debug Sending[c2s]: <presence from='[email protected]/448ddea4' id='AwXwU-149' to='[email protected]/focus32210095996901258' type='unavailable' xmlns='jabber:client'>
c2s55b17ab56330 debug Sending[c2s]: <presence from='[email protected]/448ddea4' id='AwXwU-149' type='unavailable' to='[email protected]/tYARglho'>
c2s55b17ae40d40 debug Received[c2s]: <iq type='set' id='1hORO-3097' to='[email protected]/448ddea4'>
c2s55b17ae40d40 debug Sending[c2s]: <iq from='[email protected]/448ddea4' type='error' id='1hORO-3097' to='[email protected]/focus32210095996901258'>
Let's take line #3 above for example.
Prosody IM printed Sending[c2s]: <presence from='[email protected]/448ddea4' id='AwXwU-149' type='unavailable' to='[email protected]/9W3u-kLN'>
.
However, the full XMPP message is:
<presence from='[email protected]/448ddea4' id='AwXwU-149' to='[email protected]/9W3u-kLN' type='unavailable'
xmlns='jabber:client'>
<x
xmlns='http://jabber.org/protocol/muc#user'>
<item role='none' jid='[email protected]/tYARglho' affiliation='none'/>
</x>
</presence>
My problem is how can I optimize the logging configuration for Prosody IM to get fully detailed XMPP message as above.
And I have checked their documents:
Found nothing on this topic.
Thanks in advance.
Well, I finally figured out how to log fully detailed XMPP message in Prosody IM.
You will need
mod_stanza_debug
to achieve this.From Prosody IM website:
It has been bundled in Prosody Installation. Just enable it by editing
modules_enabled
entry in Prosody global configuration file:And finally , I can get the fully detailed XMPP message: