Skip to content

Commit 1462778

Browse files
author
pavel.n@done-it.net
committed
update retrofit module
1 parent 630fefb commit 1462778

2 files changed

Lines changed: 7 additions & 1 deletion

File tree

retrofit/src/main/java/com/vrgsoft/retrofit/RetrofitModule.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ object RetrofitModule {
3737

3838
builder.cache(instance())
3939

40-
if (BuildConfig.DEBUG) {
40+
if (RetrofitConfig.enableLogging) {
4141
val loggingInterceptor = HttpLoggingInterceptor()
4242
loggingInterceptor.level = HttpLoggingInterceptor.Level.BODY
4343
builder.addInterceptor(loggingInterceptor)

retrofit/src/main/java/com/vrgsoft/retrofit/common/RetrofitConfig.kt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,10 @@ package com.vrgsoft.retrofit.common
33
object RetrofitConfig {
44
lateinit var baseUrl: String
55
lateinit var auth: Auth
6+
7+
internal var enableLogging = false
8+
9+
fun enableLogging() {
10+
enableLogging = true
11+
}
612
}

0 commit comments

Comments
 (0)