Add log utility

This commit is contained in:
Pavel fljot 2014-10-23 02:10:15 +03:00
parent 822f6d7860
commit 8d9c8d3bbb

View file

@ -0,0 +1,15 @@
package org.gestouch.utils
{
public function log(...args):void
{
// You can switch to custom logging if you really need it for debugging
var tmp:Array = new Error().getStackTrace().split("\n");
tmp = tmp[2].split(" ");
tmp = tmp[1].split("[");
// tmp[0] is a string "class/method()"
args.unshift("[Gestouch]", tmp[0]);
trace.apply(null, args);
}
}