Permalink
Browse files

added change stream direction prefixes to XMPPDebug

  • Loading branch information...
1 parent 4e4182a commit 23c20604525647b3f367e4733b784318db816d72 tong committed Sep 12, 2012
Showing with 6 additions and 3 deletions.
  1. +6 −3 jabber/XMPPDebug.hx
View
@@ -151,26 +151,29 @@ class XMPPDebug {
/** Indicates if the XMPP transfer should get printed to the browser console */
public static var useConsole : Bool;
+ public static var prefixClient = "client";
+ public static var prefixServer = "server";
static var currentGroup : String;
public static function __print( t : String, out : Bool = true, level : String = "log" ) {
//var num = out ? numPrintedOutgoing++ : numPrintedIncoming++;
- var info = out ? ">>> xmpp >>>" : "<<< xmpp <<< "; // )+" ("+num+":"+(++numPrinted)+")";
#if air
+ var info = out ? ">>> xmpp >>>" : "<<< xmpp <<< "; // )+" ("+num+":"+(++numPrinted)+")";
haxe.Log.trace( t, { className : "", methodName : "", fileName : info, lineNumber : t.length, customParams : [] } );
#else
if( useConsole ) {
if( currentGroup == null ) {
- __console( "group", currentGroup = "xmpp "+(out?">>>":"<<<") );
+ __console( "group", currentGroup = "xmpp "+(out?prefixClient:prefixServer) );
} else {
if( out && !lastPrintWasOutgoing || !out && lastPrintWasOutgoing ) {
__console( "groupEnd" );
- __console( "group", currentGroup = "xmpp "+(out?">>>":"<<<") );
+ __console( "group", currentGroup = "xmpp "+(out?prefixClient:prefixServer) );
}
}
__console( level, t );
} else {
+ var info = out ? ">>> xmpp >>>" : "<<< xmpp <<< ";
haxe.Log.trace( t, { className : "", methodName : "", fileName : info, lineNumber : t.length, customParams : [] } );
}
#end

0 comments on commit 23c2060

Please sign in to comment.