Is there an api to listen error messages? I do know error messages are displayed in debug console when debugging.

I'm trying to log possible errors in release build.

If you're running it on linux, you can just redirect the output to a file.

godot &> log.txt

    duane My app is running on iOS. I need a way to record runtime errors.

    With Android, you can use adb (Android Debug Bridge) to view output from the app. I don't know anything about iOS, but maybe there's a similar tool.

    a month later

    I find a way by writing an iOS plugin. There is function void add_error_handler(ErrorHandlerList *p_handler) in error_macros.h which can be accessed in iOS plugin. Define a custom ErrorHandler and add it. Then, all errors are listened.