Packageorg.spicefactory.lib.logging
Classpublic class LogUtil

Static utility methods for formatting log output.



Public Methods
 MethodDefined by
  
format(value:*, indent:uint = 0):String
[static] Creates formatted log output for the given value, starting with the specified indentation level.
LogUtil
  
formatArray(arr:Array, indent:uint):String
[static] Creates formatted log output for the given Array, starting with the specified indentation level.
LogUtil
  
formatObject(obj:Object, indent:uint):String
[static] Creates formatted log output for the given Object, starting with the specified indentation level.
LogUtil
  
getLogName(object:Object):String
[static] Retutns the name for a logger as a String based on the specified object.
LogUtil
Method detail
format()method
public static function format(value:*, indent:uint = 0):String

Creates formatted log output for the given value, starting with the specified indentation level.

Parameters
value:* — the value to create formatted output for
 
indent:uint (default = 0) — the indentation level to start from

Returns
String — the formatted log output
formatArray()method 
public static function formatArray(arr:Array, indent:uint):String

Creates formatted log output for the given Array, starting with the specified indentation level.

Parameters
arr:Array — the Array to create formatted output for
 
indent:uint — the indentation level to start from

Returns
String — the formatted log output
formatObject()method 
public static function formatObject(obj:Object, indent:uint):String

Creates formatted log output for the given Object, starting with the specified indentation level. Each property name and value for the specified object will be added to the formatted output.

Parameters
obj:Object — the Object to create formatted output for
 
indent:uint — the indentation level to start from

Returns
String — the formatted log output
getLogName()method 
public static function getLogName(object:Object):String

Retutns the name for a logger as a String based on the specified object. If the name parameter is a Class instance, the fully qualified class name will be used. Otherwise the toString method will be invoked on the given name instance.

Parameters
object:Object

Returns
String