Skip to content

Commit

Permalink
update retrofit module
Browse files Browse the repository at this point in the history
  • Loading branch information
[email protected] committed Nov 6, 2019
1 parent 630fefb commit 1462778
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ object RetrofitModule {

builder.cache(instance())

if (BuildConfig.DEBUG) {
if (RetrofitConfig.enableLogging) {
val loggingInterceptor = HttpLoggingInterceptor()
loggingInterceptor.level = HttpLoggingInterceptor.Level.BODY
builder.addInterceptor(loggingInterceptor)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,10 @@ package com.vrgsoft.retrofit.common
object RetrofitConfig {
lateinit var baseUrl: String
lateinit var auth: Auth

internal var enableLogging = false

fun enableLogging() {
enableLogging = true
}
}

0 comments on commit 1462778

Please sign in to comment.