Skip to main content
This Rive runtime includes logging capabilities to help with debugging. These logs are only for debugging purposes; nothing is sent over the network, and no personally identifiable information (PII) is logged. The table below showcases the runtimes that support logging.
This page only applies to the new runtime, @rive-app/react-native 0.5.0 or later.
By default, Rive logs to Logcat on Android and to React Native’s 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

Messages start with [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 is warn.

Using a custom logger

Only one handler is active at a time, so setHandler and forwardToConsole replace each other. Tags differ between iOS and Android, so don’t match on specific tags.

Returning to the default

Call RiveLog.resetHandler() to remove the current handler and log to Logcat and RCTLog again.