RIALogger and RIALoggerApp

RIALogger and RIALoggerApp - (Flex 2+ / Flash Player 9)

2008.08.26 Updated to RIALogger/RIALoggerApp version 2

RIALogger Source

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:

XML:
  1. <renaun:LogController
  2.     id="lc"
  3.     defaultTarget="RIALogger"
  4.     defaultFilter="*"
  5.     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.

CODE:
  1. // Information log method
  2. RIALogger.info( this, "myFunction did not call sample text" );
  3. RIALogger.info( MyClass, "myFunction did not call sample text" );
  4. RIALogger.info( "custom category", "myFunction did not call sample text" );
  5.  
  6. // Inserting parameters into a string
  7. RIALogger.debug( this, "My Object {0} here I come", "Fred" );
  8. // output: My Object Fred here I come
  9.  
  10. // TestPoint messages
  11. RIALogger.test( MyClass, "myTestPoint", {prop1:"value1"});

RIALoggerApp

How to use

  1. Download and install RIALoggerApp.air
  2. Run RIALoggerApp.air application
  3. Go to http://renaun.com/rialogger/example/LoggerPerformanceTest.html and click on the test buttons.

How to use with your Applications

  1. Download RIALogger.swc. (For Firefox, right click and select "Save Link As..")
  2. 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
  3. . Or place in your Flex/AIR projects library path (ie: Flex 3's project lib folder).

  4. Open up the main mxml application file of the Flex/AIR project and include the target code. See example below
      XML:

      1. <renaun:LogController
      2.     id="lc"
      3.     defaultTarget="RIALogger"
      4.     defaultFilter="*"
      5.     identifier="MyAPPId" />

Features

  1. Multiple log tabs, defined by application. Allows for multiple instances of an application to be logged easily.
  2. Filter log items by Categroy.
  3. Save logs to a file.
  4. Create TestPoint scripts visually.
  5. Settings panel, set row colors per level, max log items, etc...


Disclaimer: I work as a Flash/Flex Developer for Adobe Systems Incorporated. The opinions expressed here represent my own and not those of my employer.

My Amazon.com Wish List

Categories

Links

Feeds


Flex.org - The Directory for Flex