RIALogger and RIALoggerApp
RIALogger and RIALoggerApp - (Flex 2+ / Flash Player 9)
2008.08.26 Updated to RIALogger/RIALoggerApp version 2
Overview:
The RIALogger class the Flex Log and logging Target classes. It provides a simple approach to logging messages with category information. There are also supporting classes to providing hooks into multiple targets. LogController class supports the following logging targets by default: RIALoggerTarget, TraceTarget (trace()), XPanelTarget, and FlexTracePanelTarget. RIALogger also provides the "test" method which is used by the TestPoint approach and RIALoggerApp.
To setup a logging target with 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
-
RIALogger.info( this, "myFunction did not call sample text" );
-
RIALogger.info( MyClass, "myFunction did not call sample text" );
-
RIALogger.info( "custom category", "myFunction did not call sample text" );
-
-
// Inserting parameters into a string
-
RIALogger.debug( this, "My Object {0} here I come", "Fred" );
-
// output: My Object Fred here I come
-
-
// TestPoint messages
-
RIALogger.test( MyClass, "myTestPoint", {prop1:"value1"});
RIALoggerApp
How to use
- Download and install RIALoggerApp.air
- Run RIALoggerApp.air application
- Go to http://renaun.com/rialogger/example/LoggerPerformanceTest.html and click on the test buttons.
How to use with your Applications
- Download RIALogger.swc. (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 RIALogger.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: -
. Or place in your Flex/AIR projects library path (ie: Flex 3's project lib folder).
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.
- Create TestPoint scripts visually.
- Settings panel, set row colors per level, max log items, etc...


