Logging cleanup: delete AppLog.kt and enable KLog via BuildConfig in MainActivity
This commit is contained in:
@@ -195,6 +195,7 @@ class MainActivity : ComponentActivity() {
|
||||
|
||||
override fun onCreate(savedInstanceState: Bundle?) {
|
||||
super.onCreate(savedInstanceState)
|
||||
KLog.setEnabled(BuildConfig.KLLOG_DEBUG) // Styr loggnivå via buildflagga
|
||||
app.klottr.prefs.KvPrefs.init(applicationContext)
|
||||
|
||||
// FG + (ev) BG platstillstånd
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
package app.klottr.util
|
||||
|
||||
import android.util.Log
|
||||
import app.klottr.BuildConfig
|
||||
|
||||
object AppLog {
|
||||
inline fun d(tag: String = "Klottr", msg: () -> String) {
|
||||
if (BuildConfig.KLLOG_DEBUG) Log.d(tag, msg())
|
||||
}
|
||||
inline fun i(tag: String = "Klottr", msg: () -> String) {
|
||||
if (BuildConfig.KLLOG_DEBUG) Log.i(tag, msg())
|
||||
}
|
||||
inline fun w(tag: String = "Klottr", msg: () -> String) {
|
||||
if (BuildConfig.KLLOG_DEBUG) Log.w(tag, msg())
|
||||
}
|
||||
inline fun e(tag: String = "Klottr", msg: () -> String, tr: Throwable? = null) {
|
||||
if (BuildConfig.KLLOG_DEBUG) Log.e(tag, msg(), tr)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user