Logger Library and RIALogger
Logger Library and RIALogger - (Flex 2+ / Flash Player 9)
2008.01.28 - Latest source
Overview:
The Logger component provides classes to that abstract the Flex 2 Log and logging Target classes. It provides a simple approach to logging messages with category information and provide hooks into multiple targets. It supports the following logging targets by default: RIALoggerTarget, TraceTarget (trace()), XPanelTarget, and FlexTracePanelTarget. The LogController also provides functionality to allow you to setup your own custom logging Target.
You use the class by including the LogController class
-
<renaun:LogController
-
id="lc"
-
defaultTarget="RIALogger"
-
defaultFilter="*"
-
identifier="MyAPPId" />
This class differs from the Log class by providing static debug, error, info,
warn method calls to abstract the complexity of creating a LogTarget for each instance where you need logging.
-
// Information log method
-
Logger.info( this, "myFunction did not call sample text" );
-
Logger.info( MyClass, "myFunction did not call sample text" );
-
Logger.info( "custom category", "myFunction did not call sample text" );
-
-
// Inserting parameters into a string
-
Logger.debug( this, "My Object {0} here I come", "Fred" );
-
// output: My Object Fred here I come
This class can be used in connection with the new RIALogger.
RIALogger
How to use
- Download and install RIALogger.air
- Run RIALogger AIR application
- Go to http://renaun.com/rialogger/example/TestLogging.html and click on the test buttons.
How to use with your Applications
- Download and unzip renaun_com_Logger.zip to a place you can link to in your Flex/AIR projects. (For Firefox, right click and select "Save Link As..")
- In the Flex/AIR project goto Project -> Properties -> Flex Library Build Path -> Library Path. Click on the "Add SWC..." button and add the downloaded renaun_com_Logger.swc
- Open up the main mxml application file of the Flex/AIR project and include the target code. See example below
-
<renaun:LogController
-
id="lc"
-
defaultTarget="RIALogger"
-
defaultFilter="*"
-
identifier="MyAPPId" />
XML: -
Features
- Multiple log tabs, defined by application. Allows for multiple instances of an application to be logged easily.
- Filter log items by Categroy
- Save logs to a file
- Settings panel, set row colors per level, max log items, etc...
- Search log for specific text
Components that Use Logger Component:


