Reputation: 239
Is it possible to save logs of Trace somewhere, so that I can look up traces for players?
Upvotes: 0
Views: 393
Reputation: 18757
Yes, but for that you need a logger function instead of trace(). By the way, if you compile your SWF in release mode, no traces will happen. Say like this one:
private static var COMPLETE_LOG:String='';
public static function log(...args):void {
var i:int; var s:String='\n';
for (i=0;i<args.length;i++) {
if (i>0) s+=' ';
s+=args[i].toString();
}
COMPLETE_LOG+=s;
}
Use log() instead of trace() to capture traces you need. And then say upload that COMPLETE_LOG somewhere.
Upvotes: 1