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”);


Leave a comment

No comments yet.

Comments RSS TrackBack Identifier URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s