How to log incoming/outgoing traffic from xiff

For anyone having protocol related issues with usage of XIFF Library, POST your traffic logs so we can see them to figure out what exactly is going on.

To log traffic, do the following:

cnxn.addEventListener(OutgoingDataEvent.OUTGOING_DATA, onOutgoingData);
cnxn.addEventListener(IncomingDataEvent.INCOMING_DATA, onIncomingData); private function onOutgoingData(event:OutgoingDataEvent):void {
      //-----------UNCOMMENT THIS LINE TO SEE DEBUGGING OUTPUT-----------------------------------
      trace("OUT: " + new Date().toTimeString() + " - " + event.data.toString()); } private function onIncomingData(event:IncomingDataEvent):void {
      //-----------UNCOMMENT THIS LINE TO SEE DEBUGGING OUTPUT-----------------------------------
      trace("IN: " + new Date().toTimeString() + " - " + event.data.toString()); }

Admins, could we make this a sticky thread?