Created
December 22, 2022 11:45
-
-
Save Krillsson/336bc6a4bc317b2b05dc1b6a42e6d6e9 to your computer and use it in GitHub Desktop.
Setting up Sensible Logging with BuildConfigCategoryFilter
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
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