Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint
Share this Page URL
Help

Chapter 19: Logging > Client-side logging - Pg. 253

252 Chapter 19: Logging One tool that can help in debugging applications is the logging mechanism. You can perform both client-side and server-side logging. Client-side logging writes log messages from the Flex client to a file on the client computer. Server-side logging writes log messages from the LiveCycle Data Services ES server to a designated logging target, which can be the log location for the servlet container, System.out, or a custom location. Topics Client-side logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 252 Server-side logging . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 253 Monitoring and managing services . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 257 Client-side logging For client-side logging, you can directly write messages to the log file, or configure the application to write messages generated by Flex to the log file. The Flash Debug Player has two primary methods of writing messages to a log file: · The global trace() method The global trace() method prints a String to the log file. Messages can contain checkpoint information to signal that your application reached a specific line of code, or the value of a variable. · Logging API The logging API, implemented by the TraceTarget class, provides a layer of functionality on top of the trace() method. For example, you can use the logging API to log debug, error, and warning messages generated by Flex during application execution. The Flash Debug Player sends logging information to the flashlog.txt file. The operating system determines the location of this file, as the following table shows: Operating system Windows 95/98/ME/2000/XP Windows Vista Mac OS X Linux Log file location C:\Documents and Settings\username\Application Data\Macromedia\Flash Player\Logs C:\Users\username\AppData\Roaming\Macromedia\Flash Player\Logs /Users/username/Library/Preferences/Macromedia/Flash Player/Logs/ /home/username/.macromedia/Flash_Player/Logs/ Use settings in the mm.cfg text file to configure the Flash Debug Player for logging. If this file does not exist, you can create it when you first configure the Flash Debug Player. The following table shows where to create the mm.cfg file for different operating systems: Operating system Mac OS X Windows 95/98/ME Windows 2000/XP Create file in ... /Library/Application Support/Macromedia %HOMEDRIVE%\%HOMEPATH% C:\Documents and Settings\username