Out is a multi-tiered trace replacement which uses debug levels and object/instance filters to assist and clarify the debugging process. New level method calls can be created dynamically "overloading" the class via __resolve and proxy.
Usage: var out:Out = Out.getInstance(); out.createPanel(640,480); // optionally create an outPanel in the swf out.trace(this,"hello world"); // simple hello world out.setFilter(this,true); // filters this object from further output out.info(this,"hello world"); // wont display due to filter out.setFilter(this,false); // unfilter this object out.setLevel("trace",false); // disable level trace out.trace(this,"hello world"); // wont display due to disabled level out.setLevel("debug",true); // creates a new level named "debug" & enable it out.debug(this,"hello world"); // displays within the new debug level out.object(this,{foo:5, bar:1}); // special object level does basic object recursion
public trace:Functionpublic info:Functionpublic status:Functionpublic warn:Functionpublic error:Functionpublic fatal:Functionstatic public $:Out [Read Only]public enabled:Booleanpublic _status:String [Read Only]public function createPanel(w:Number, h:Number):Voidwrapper to draw a panel to swf for output via OutPanel
w | (Number) panel width |
h | (Number) panel height |
Void
public function setLevel(level:String, isEnabled:Boolean):Voidset a levels enabled status or create a new level
level | (String) level name |
isEnabled | (Boolean) |
Void
public function setAllLevels(isEnabled:Boolean):Voidset all levels status
isEnabled | (Boolean) |
Void
public function getLevels():Stringreturns a string of all levels for overview/status purposes
String
public function setFilter(origin:Object, isFiltered:Boolean):Voidset a filters enabled status or create a new filter
origin | (Object) object to set filter on |
isFiltered | (Boolean) |
Void
public function getFilters():Stringreturn a string of all filters for overview/status purposes
String
public function object(origin:Object, obj:Object):Voidobject is a special level (method) which handles object recursion via Inspector
origin | (Object) origin for filtering purposes |
obj | (Object) object to be recursed thru Out |
Void
public function benchmark(origin:Object, msg:String, mode:String):Voidbenchmark is a special level (method) which handles benchmarking of call execution
origin | (Object) origin for filtering purposes |
msg | (String) any extraneous name or message info you wish to output before the benchmark results |
mode | (String) valid modes are: "start", "stop", "lap" |
Void
| Error | on invalid 'mode' argument |