Checking if Timber has been planted before trying to uproot it

This commit is contained in:
Andre Rosado 2024-10-30 11:56:34 +01:00
parent 540ece5a40
commit 3d15d35996
No known key found for this signature in database
GPG key ID: 99F68267CCD45AA9

View file

@ -30,7 +30,7 @@ class LogsManagerImpl(
} }
if (value) { if (value) {
Timber.plant(nonfatalErrorTree) Timber.plant(nonfatalErrorTree)
} else { } else if (Timber.forest().contains(nonfatalErrorTree)) {
Timber.uproot(nonfatalErrorTree) Timber.uproot(nonfatalErrorTree)
} }
} }