FLEX.ZTOR.COMSimple logging tool for Flex2 and ActionScript3.
Main
Intro
FAQ
email   print    
 
ZTORLog4f logging tool
arrow
 
bullet
bullet
bullet

ZTORLog4f sends log messages to the appenders (analog of logger target from mx.logging.targets package).There are 3 kinds of appenders in current release:


- SOTarget - outputs messages directly to SharedObject.
- LCTarget - outputs messages directly to LocalConnection server.
- TRTarget - outputs messages IDE console (trace functionality).

Messages sent by SOTarget and LCTarget can by displayed in ZTORLog4f Console. Be sure that you start Console from the same domain as your SWF file. Each appender can be configured by editing external config file or by calling ZTORLog4f static methods. Default configuration is below:

<log4f>
  <logger name="root" level="ALL"/>
  <appender name="SO" class="com.ztor.logging.target.SOTarget">
    <param name="File" value="ztorlog"/>
    <param name="Append" value="true"/>
    <param name="Capacity" value="100"/>
    <param name="Threshold" value="FATAL"/>
  </appender>
  <appender name="LC" class="com.ztor.logging.target.LCTarget">
    <param name="Threshold" value="ALL"/>
  </appender>
  <appender name="TR" class="com.ztor.logging.target.LCTarget">
    <param name="Threshold" value="OFF"/>
  </appender>
</log4f>

Each appender has Threshold property. It sets max level for messages which accepted by this appender. In current release we implement only one logger - "root". Property "level" of the "root" logger is global for all loggers. (it suppress Threshold property of appenders. If level for the appender less than root level - root level accepted for the appender.) There are follow levels in current release: DEBUG,INFO,WARN,ERROR,FATAL. DEBUG is lowest level, FATAL is highest. To ignore all messages set OFF, to accept all set ALL.

 
Copyright (c) 2006 ZTOR.COM