This page only applies to the new
runtime,
@rive-app/react-native 0.5.0 or later.RCTLog on iOS. Nothing reaches JavaScript until you call RiveLog.forwardToConsole() or RiveLog.setHandler().
On iOS, errors are logged with RCTLogError, so debug builds also show them as a red error screen. Forwarding logs to the console or setting a handler avoids this.
Forwarding logs to the console
[Rive/<tag>]. Debug and info logs use console.log. Warnings and errors both use console.warn, so they don’t show the red error screen in debug builds. Errors you can handle reach your app through onError and rejected promises. See Error handling.
Setting the logging level
Logs below the level you set are dropped everywhere. The default iswarn.
Using a custom logger
setHandler and forwardToConsole replace each other. Tags differ between iOS and Android, so don’t match on specific tags.
Returning to the default
CallRiveLog.resetHandler() to remove the current handler and log to Logcat and RCTLog again.