Using the trace() function output is written to the file flashlog.txt if the debug version of Flash Player is used.
Then the Flash Player must be configured to enable logging using the mm.cfg file. It’s location is OS dependent, as well as the (hard-coded) location of the resulting flashlog.txt file. Location and possible settings of the mm.cfg file are documented here.
Using Mac OSX or Linux a convenient way to view the log file is to use tail -f from the command line, e.g.:
tail -f /Users/<user>/Library/Preferences/Macromedia/Flash Player/Logs/flashlog.txt