Ignore debug mode when choosing logger level

This commit is contained in:
NerdNumber9 2019-04-14 13:54:31 -04:00
parent aed20a790e
commit 3cc3799ebb
2 changed files with 2 additions and 2 deletions

View File

@ -116,7 +116,7 @@ open class App : Application() {
private fun setupExhLogging() {
EHLogLevel.init(this)
val logLevel = if(BuildConfig.DEBUG || EHLogLevel.shouldLog(EHLogLevel.EXTRA)) {
val logLevel = if(EHLogLevel.shouldLog(EHLogLevel.EXTRA)) {
LogLevel.ALL
} else {
LogLevel.WARN

View File

@ -12,7 +12,7 @@ enum class EHLogLevel(val description: String) {
companion object {
private var curLogLevel: Int? = null
val currentLogLevel get() = EHLogLevel.values()[curLogLevel!!]
val currentLogLevel get() = values()[curLogLevel!!]
fun init(context: Context) {
curLogLevel = PreferencesHelper(context)