A good starting point would be the as2lib Logging.
The only thing you have to do is following:
If you also want to profit from preconfigured application configuration:
- create your personal main.Configuration class which e.g. initializes
your application
- Want to create a MTASC application, point to
org.as2lib.app.conf.Mtascapplication as your main entry point( Flashout
logging is set up for you)
- Want to create a Flash application just call
org.as2lib.app.conf.FlashApplication.init() in your flash file (Trace
logging is set up for you)
If you want to use other logger or output you can create your own
application classes or just have to use following codesnippet for set up
logging:
import org.as2lib.env.log.logger.RootLogger;
import org.as2lib.env.log.level.AbstractLogLevel;
import org.as2lib.env.log.handler.SosHandler;
import org.as2lib.env.log.repository.LoggerHierarchy;
import org.as2lib.env.log.LogManager;
...
// creates a new root logger
var root:RootLogger = new RootLogger(AbstractLogLevel.ALL);
// You can use the logger of your choice e.g. LuminicBoxHandler,
SosHandler,...
// If your desired logger is not supported you can easily create one or
send me an e-mail
root.addHandler(new SosHandler());
// sets the logger hierarchy as repository
LogManager.setLoggerRepository(new LoggerHierarchy(root));
In code using logging could look like this
import org.as2lib.env.log.LogManager;
import org.as2lib.env.log.Logger;
...
var logger:Logger = LogManager.getLogger("yourpackage.Yourclass");
if(logger.isDebugEnabled()){
logger.debug("please debug me");
}
Now you can easily switch between loggers and set your desired output
level.
Your just have to change following lines from the code above:
var root:RootLogger = new RootLogger(AbstractLogLevel.ERROR);
root.addHandler(new LumincBoxHandler());
greez
Christoph
________________________________
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im
Auftrag von Manuel Saint-Victor
Gesendet: Montag, 19. September 2005 23:06
An: Open Source Flash Mailing List
Betreff: [osflash] Best way to start using AS2Lib
What do you guys recommend as a way to start investigating the AS2Lib
contents? Would you say start using it in a project and just start
using a particular subsection. I have been browsing it using SEPY's
class browser and FDT but wonder what most people do to get started
using is in their workflow.
Mani
_______________________________________________
osflash mailing list
[email protected]
http://osflash.org/mailman/listinfo/osflash_osflash.org