vrathore
unread,Aug 9, 2008, 2:37:40 AM8/9/08Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Delhi Flex User Group
Here is a sample code for using Log Class for flex
import mx.logging.targets.*;
import mx.logging.*;
private function initLogging():void {
// Create a target.
var logTarget:TraceTarget = new TraceTarget();
// Log only messages for the classes in the mx.rpc.* and
// mx.messaging packages.
logTarget.filters=["mx.rpc.*","mx.messaging.*"];
// Log all log levels.
logTarget.level = LogEventLevel.ALL;
// Add date, time, category, and log level to the output.
logTarget.includeDate = true;
logTarget.includeTime = true;
logTarget.includeCategory = true;
logTarget.includeLevel = true;
// Begin logging.
Log.addTarget(logTarget);
}
will agree with the saying, “Old habits die hard”, but when I started
using the Flex logging classes, it wasn’t a difficult transition at
all. If you’re an old Flash Developer turned Flex, I strongly urge you
to check out the Flex Logging classes!
Cheers
Varun Rathore