Logging in Flex like log4J

Here is a quick way to put logs in your Flex code. Inside each class or MXML, create a variable to hold the logging.

private static const logger:ILogger = Log.getLogger(“MyLoggingName”);

Then inside the class, put the following line to trigger an output:

logger.info(“Inside creationCompleteHandler”);


logger.debug(“Inside creationCompleteHandler”);