Do you want to log this information on the user's computer or on a server? Or maybe on your computer?
If you want to log onto a server, you need some kind of server-side script (php, asp, whatever) to send your data from flash to the server. This is a solution, but it's not super optimal, since you would create a http request each time there's an error.
You can also take a look at SOS from Powerflasher. I've never used it but I think it might do what you want.
Finally, if you just want to see those error as a debugging tool, well there's a bunch of option for you. Basicaly you will use the trace function and use some tool to read the file where those "traces" are logged. Such tools are ThunderboltAS3 or Flash tracer. Sometimes those tool will require you to use something else than the trace function to provide greater control over your message.