commonTest.com.toxicbakery.logging.TestSeedling.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of arbor Show documentation
Show all versions of arbor Show documentation
Like Timber, just different.
package com.toxicbakery.logging
data class TestSeedling(
override val tag: String = ""
) : ISeedling {
private val logBuffer: StringBuilder = StringBuilder()
val log: String
get() = logBuffer.toString()
override fun log(
level: Int,
tag: String,
msg: String,
throwable: Throwable?,
args: Array?
) {
val exceptionString = throwable?.message?.let { " $it" } ?: ""
logBuffer.append("$level $tag $msg$exceptionString")
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy