Packagede.flamelab.log
Classpublic class LogRegistry

Registry class for log instances. The registry offers the possibilty to manage different log instances through a single static class. This allows the usage of log objects in different classes without passing the objects from class to class. The registry itself is created as a singleton.



Public Methods
 MethodDefined by
  
LogRegistry(singleton:LogSingleton)
Constructor, only works if instance of internal class LogSingleton is passed in as argument.
LogRegistry
  
getAll():Object
[static] Return object list of all registered instances with name identifiers
LogRegistry
  
[static] Get singleton instance of class.
LogRegistry
  
getLog(key:String):Log
[static] Get log instance stored in registry.
LogRegistry
  
removeLog(key:String):Boolean
[static] remove log instance from registry.
LogRegistry
  
setLog(key:String, log:Log):Boolean
[static] Add log instacne to registry.
LogRegistry
  
unset():void
[static] Unset registry and clear registrations.
LogRegistry
Constructor detail
LogRegistry()constructor
public function LogRegistry(singleton:LogSingleton)

Constructor, only works if instance of internal class LogSingleton is passed in as argument.

Parameters
singleton:LogSingleton — Instance of internal class LogSingleton
Method detail
getAll()method
public static function getAll():Object

Return object list of all registered instances with name identifiers

Returns
Object — Object Hash with all name->Log instance associations
getInstance()method 
public static function getInstance():LogRegistry

Get singleton instance of class.

Returns
LogRegistry — LogRegistry Singleton instance of class
getLog()method 
public static function getLog(key:String):Log

Get log instance stored in registry.

Parameters
key:String — Identifier for instance

Returns
Log — Log Instance registered with name or null if no instance can be found
removeLog()method 
public static function removeLog(key:String):Boolean

remove log instance from registry.

Parameters
key:String — Identifier for instance

Returns
Boolean — Boolean true if removing worked false if name is not registered
setLog()method 
public static function setLog(key:String, log:Log):Boolean

Add log instacne to registry.

Parameters
key:String — Identifier for instance
 
log:Log — Log instance

Returns
Boolean — Boolean true if adding worked false if name is already registered
unset()method 
public static function unset():void

Unset registry and clear registrations.