Skip to content

Instantly share code, notes, and snippets.

@LloydBlv
Last active January 27, 2024 04:18
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save LloydBlv/7dbb187f9e5eeac76fe01e7dd4fb20d9 to your computer and use it in GitHub Desktop.
val logging = new HttpLoggingInterceptor()
val level = if (BuildConfig.DEBUG) Level.BASIC else Level.NONE
logging.setLevel(level)
val client = OkHttpClient.Builder()
.addInterceptor(logging)
.build()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment