diff --git a/demo/src/main/java/com/michaelflisar/lumberjack/demo/App.kt b/demo/src/main/java/com/michaelflisar/lumberjack/demo/App.kt index 175b26e..c944a11 100644 --- a/demo/src/main/java/com/michaelflisar/lumberjack/demo/App.kt +++ b/demo/src/main/java/com/michaelflisar/lumberjack/demo/App.kt @@ -1,8 +1,7 @@ package com.michaelflisar.lumberjack.demo import android.app.Application -import com.michaelflisar.lumberjack.FileLoggingSetup -import com.michaelflisar.lumberjack.FileLoggingTree +import android.util.Log import com.michaelflisar.lumberjack.L import timber.log.ConsoleTree @@ -18,6 +17,9 @@ class App : Application() { L.enabled = BuildConfig.DEBUG // we can filter out logs based on caller class names like following e.g.: - // L.packageNameFilter = { packageName -> !packageName.startsWith(MainActivity::class.java.name) } +// L.packageNameFilter = { +// Log.d("PACKAGE_NAME_FILTER", "packageName = $it") +// !it.startsWith(MainActivity::class.java.name) +// } } } \ No newline at end of file diff --git a/library-java-wrapper/src/main/java/com/michaelflisar/lumberjack/L2.kt b/library-java-wrapper/src/main/java/com/michaelflisar/lumberjack/L2.kt index b0fb74a..7799462 100644 --- a/library-java-wrapper/src/main/java/com/michaelflisar/lumberjack/L2.kt +++ b/library-java-wrapper/src/main/java/com/michaelflisar/lumberjack/L2.kt @@ -115,7 +115,7 @@ object L2 { fun log(logBlock: () -> Unit) { if (L.enabled && Timber.treeCount() > 0) { L.callStackCorrection(4) - if (L.packageNameFilter?.let { it.invoke(StackData.create(0).className) } != false) + if (L.packageNameFilter?.let { it.invoke(StackData.create(null, 0).className) } != false) logBlock() } }