AAkira / Napier

Logging library for Kotlin Multiplatform
Apache License 2.0
820 stars 36 forks source link

Add opportunity to setup debug antilog levels #102

Open InsanusMokrassar opened 2 years ago

AAkira commented 2 years ago

Napier is originally designed to be used with your own customization of AntiLog. However, Napier provided a DebugAntilog for easy debugging on each platform. Therefore, we basically want you to customize Antilog on your own. However, we understand your desire to use DebugAntilog.

How about inheriting DebugAntilog like this?

actual open class DebugAntilog actual constructor(private val defaultTag: String) : Antilog() {
}
class MyDebugAntilog(defaultTag: String) : DebugAntilog(defaultTag) {
    override fun isEnable(priority: LogLevel, tag: String?): Boolean = priority > LogLevel.INFO
}