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:Function
public info:Function
public status:Function
public warn:Function
public error:Function
public fatal:Function
static public $:Out [Read Only]
public enabled:Boolean
public _status:String [Read Only]
public function createPanel(w:Number, h:Number):Void
wrapper 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):Void
set a levels enabled status or create a new level
level | (String) level name |
isEnabled | (Boolean) |
Void
public function setAllLevels(isEnabled:Boolean):Void
set all levels status
isEnabled | (Boolean) |
Void
public function getLevels():String
returns a string of all levels for overview/status purposes
String
public function setFilter(origin:Object, isFiltered:Boolean):Void
set a filters enabled status or create a new filter
origin | (Object) object to set filter on |
isFiltered | (Boolean) |
Void
public function getFilters():String
return a string of all filters for overview/status purposes
String
public function object(origin:Object, obj:Object):Void
object 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):Void
benchmark 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 |