Flex logging consists of two main components:
** The target tells the logging framework where to output log messages. Flex includes a tar-
get implementation, TraceTarget, that outputs log messages by using the same inter-
nal mechanism as the trace() function. You can also implement a custom Flex logging
target by extending the Flex AbstractTarget class and providing an implementation
of the abstract logEvent() function.
** The logger is the component that actually sends the log messages to the target. The logger
provides details about the code sending the message, the level of the message (info,
debug, error, etc.), and the text of the message itself. The logger also contains the set of
targets that receive the messages. Multiple targets can be added to a logger, and each of
these targets can be configured to receive a subset of the logged messages based on which
code is logging them and the level of the message.
Example:// Useprivate var _myLogger:ILogger =Log.getLogger("com.game.SBulletDisapear" );_myLogger .info( "日志测试!!" );最后提一句 在实际开发中 Firebug 是打印输出的一个不错的选择