Created
January 3, 2023 08:18
-
-
Save Krillsson/125256b8fa33b95f830b1c52d7f700ce to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
val channels = if(BuildConfig.DEBUG) { | |
val categoriesFilter = Filter.categories(listOf( | |
Categories.Default, | |
// ... | |
)) | |
val filterCombination = Filter.level(Level.WARN) or categoriesFilter | |
Log.Setup.Configuration() | |
.addLogCatChannel(filter = filterCombination) | |
.create() | |
} else { | |
Log.Setup.Configuration() | |
.addChannel(CrashlyticsChannel()) | |
.create() | |
} | |
Log.Setup.addChannels(channels) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment