All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.sentry.android.gradle.instrumentation.logcat.LogcatLevel.kt Maven / Gradle / Ivy

There is a newer version: 4.11.0
Show newest version
package io.sentry.android.gradle.instrumentation.logcat

enum class LogcatLevel(private val level: Int) {
    VERBOSE(0),
    DEBUG(1),
    INFO(2),
    WARNING(3),
    ERROR(4);

    fun supports(other: LogcatLevel): Boolean {
        return level >= other.level
    }

    companion object {
        fun logFunctionToLevel(str: String): LogcatLevel? {
            return when (str) {
                "v" -> VERBOSE
                "d" -> DEBUG
                "i" -> INFO
                "w" -> WARNING
                "e" -> ERROR
                "wtf" -> ERROR
                else -> null
            }
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy