RiveLog

object RiveLog

RiveLog allows configuring logging within Rive.

By default, it uses NoOpLogger, which does nothing. You can set your own logger by assigning an instance of Logger to RiveLog.logger. For basic logging, you can use RiveLog.LogcatLogger to log to Logcat.

Types

Link copied to clipboard

Implementation that logs to Logcat with lazy msg() evaluation.

Link copied to clipboard
interface Logger

Interface for logging. Implementations should provide methods for different log levels.

Link copied to clipboard

Implementation that logs nothing. Used by default.

Properties

Link copied to clipboard

The current logging implementation. Apps can override this to provide their own logging. For example, in your Application's onCreate:

Functions

Link copied to clipboard
inline fun d(tag: String, noinline msg: () -> String)
Link copied to clipboard
inline fun e(tag: String, t: Throwable? = null, noinline msg: () -> String)
Link copied to clipboard
inline fun i(tag: String, noinline msg: () -> String)
Link copied to clipboard
fun logD(tag: String, msg: String)
Link copied to clipboard
fun logE(tag: String, msg: String)
Link copied to clipboard
fun logI(tag: String, msg: String)
Link copied to clipboard
fun logV(tag: String, msg: String)

JNI bridge methods that take a String directly instead of a lambda. These are used by the C++ helper for efficient logging from native code.

Link copied to clipboard
fun logW(tag: String, msg: String)
Link copied to clipboard
inline fun v(tag: String, noinline msg: () -> String)
Link copied to clipboard
inline fun w(tag: String, noinline msg: () -> String)