Specifications

227
Chapter 11: Logging
You can log messages at several different points in an Adobe® Flex® applications life cycle. You can log messages
when you compile the application, when you deploy it to a web application server, or when a client runs it. You
can log messages on the server or on the client. These messages are useful for informational, diagnostic, and
debugging activities.
Topics
About logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .227
Using the debugger version of Flash Player . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .228
Client-side logging and debugging. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
Compiler logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
About logging
When you encounter a problem with your application, whether during compilation or at run time, the first step
is to gather diagnostic information to locate the cause of the problem. The source of a problem typically is in one
of two places: the server web application, or the client application.
Note: For detailed information on debugging Adobe® AIR™ applications, see "Using the AIR development tools" in
Developing AIR Applications with Adobe Flex 3.
Flex includes several different logging and error reporting mechanisms that you can use to track down failures:
Client-side logging and debugging With the debugger version of Adobe® Flash® Player, or with an AIR appli-
cation that you debug using ADL, you can use the global
trace() method to write out messages or configure a
TraceTarget to customize log levels of applications for data services-based applications. For more information, see
“Client-side logging and debugging” on page 232.
Compiler logging When compiling your Flex applications from the command line and in Adobe® Flex® Builder®,
you can view deprecation and warning messages, and sources of fatal errors. For more information, see “Compiler
logging” on page 243.
Web-tier logging The Flex module for Apache and IIS compiler has its own logging facilities. For more infor-
mation, see Using the web-tier compiler log files” on page 351.