I suppose you're talking about Adobe Flex, targeting the Flash Player?
If so, you can write your own logging wrapper class that propagates log messages sent to it to several targets (like the trace stack and internal memory so that you can access the log from within the app and e.g. send it to a server when the user agrees to send a bug report). Also see the Flex logging framework for something like this that already exists.
I've actually done something like this -- I have a class called Log
with static methods like log()
, debug()
, error()
etc. that I use in my apps, and this class forwards all messages sent to it into the trace stack via trace()
, into a "log console" app running on the same host via LocalConnection and/or Socket (a socket connection is obviously a lot faster than LocalConnection) and also saves them locally into an array so that users can send bug reports along with the log output right from within the app.
This sort of a change of course means that you'd have to translate all trace()
commands in your code into calls to the logging system, but that can be easily achieved with a regex search & replace.