Created
December 15, 2013 09:23
-
-
Save mattlundstrom/7970740 to your computer and use it in GitHub Desktop.
Flash trace() to console.log
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import flash.external.ExternalInterface; | |
| public static function log(msg:String, caller:Object = null):void{ | |
| var str:String = ""; | |
| if(caller){ | |
| str = getQualifiedClassName(caller); | |
| str += ":: "; | |
| } | |
| str += msg; | |
| trace(str); | |
| if(ExternalInterface.available){ | |
| ExternalInterface.call("console.log", str); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment