Skip to content

Instantly share code, notes, and snippets.

@Krillsson
Created January 3, 2023 08:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Krillsson/125256b8fa33b95f830b1c52d7f700ce to your computer and use it in GitHub Desktop.
Save Krillsson/125256b8fa33b95f830b1c52d7f700ce to your computer and use it in GitHub Desktop.
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