Browse Source

1.修改日志打印为LogShow。

0423x6e6f
wangwanlei 4 days ago
parent
commit
4b49f9ce5e

+ 3
- 2
corelib/src/main/java/com/xhly/corelib/network/RetrofitService.kt View File

3
 import android.annotation.SuppressLint
3
 import android.annotation.SuppressLint
4
 import android.util.Log
4
 import android.util.Log
5
 import com.xhly.corelib.Const
5
 import com.xhly.corelib.Const
6
+import com.xhly.corelib.utils.LogShow
6
 import io.reactivex.internal.subscribers.DeferredScalarSubscriber
7
 import io.reactivex.internal.subscribers.DeferredScalarSubscriber
7
 import io.reactivex.schedulers.Schedulers
8
 import io.reactivex.schedulers.Schedulers
8
 import okhttp3.OkHttpClient
9
 import okhttp3.OkHttpClient
37
         val interceptor = HttpLoggingInterceptor { message ->
38
         val interceptor = HttpLoggingInterceptor { message ->
38
             try {
39
             try {
39
                 val text: String = URLDecoder.decode(message, "utf-8")
40
                 val text: String = URLDecoder.decode(message, "utf-8")
40
-                Log.e("OKHttp-----", text)
41
+                LogShow("OKHttp-----"+text)
41
             } catch (t: Exception) {
42
             } catch (t: Exception) {
42
                 try {
43
                 try {
43
                     var encode = URLEncoder.encode(message, "utf-8")
44
                     var encode = URLEncoder.encode(message, "utf-8")
44
                     val text: String = URLDecoder.decode(encode, "utf-8")
45
                     val text: String = URLDecoder.decode(encode, "utf-8")
45
-                    Log.e("OKHttp-----DEBUG", text)
46
+                    LogShow("OKHttp-----DEBUG"+text)
46
                 } catch (e: Exception) {
47
                 } catch (e: Exception) {
47
                     t.printStackTrace()
48
                     t.printStackTrace()
48
                     e.printStackTrace()
49
                     e.printStackTrace()

Loading…
Cancel
Save