How to print log in compose

Viewed 3665

I want to print some logs for debug reason, it seems the print and Timber are all not work with compose, what's the alternative choice?

2 Answers

Timber or Log or println all work fine in Compose, If Timber is not worked, then check did you initialize Timber.

Initialize Timber as

if (BuildConfig.DEBUG) {
   Timber.plant(DebugTree)
}

inside Application::onCreate() method

Related