Skip to content

Instantly share code, notes, and snippets.

@Krillsson
Created December 22, 2022 11:45
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/336bc6a4bc317b2b05dc1b6a42e6d6e9 to your computer and use it in GitHub Desktop.
Save Krillsson/336bc6a4bc317b2b05dc1b6a42e6d6e9 to your computer and use it in GitHub Desktop.
Setting up Sensible Logging with BuildConfigCategoryFilter
if (BuildConfig.DEBUG) {
val filterCombination = Filter.level(Level.WARN) or BuildConfigCategoryFilter
val channels = Log.Setup.Configuration()
.addLogCatChannel(filter = filterCombination, default = true)
.create()
Log.Setup.addChannels(channels)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment