Administrator
2021-11-11 dadbf7a3fd20a8e0dc7e0601f30a2f696cc9fc6e
app/src/main/java/com/duqing/missions/retrofit/Interceptor/HttpLoggingInterceptor.java
@@ -51,13 +51,15 @@
        int position = logArrays.size() +2;
        Response response;
        try {
            request = encryptRequest(request);//加密
            //request = encryptRequest(request);//加密
            response = chain.proceed(request);
            logArrays.addAll(getResponseLog(response));
            Log.d(TAG,"hashcode:"+hashCode);
            NetWorkCost netWorkCost = NetWorkListenear.workCostMap.get(hashCode);
            String cost = String.format("dns:%s,secure:%s,connect:%s,requestH:%s,requestB:%s,responseH:%s,responseB:%s",  convertTimes(netWorkCost.dns) ,convertTimes(netWorkCost.secure) , convertTimes(netWorkCost.connect),convertTimes(netWorkCost.requestHeader),convertTimes(netWorkCost.requestBody) ,convertTimes(netWorkCost.resposeHeader),convertTimes(netWorkCost.resposeBody)    );
            logArrays.add(position,"<-- costtimes : "+convertTimes(netWorkCost.total)+" (" +cost + ')');
            if(netWorkCost != null) {
                String cost = String.format("dns:%s,secure:%s,connect:%s,requestH:%s,requestB:%s,responseH:%s,responseB:%s", convertTimes(netWorkCost.dns), convertTimes(netWorkCost.secure), convertTimes(netWorkCost.connect), convertTimes(netWorkCost.requestHeader), convertTimes(netWorkCost.requestBody), convertTimes(netWorkCost.resposeHeader), convertTimes(netWorkCost.resposeBody));
                logArrays.add(position, "<-- costtimes : " + convertTimes(netWorkCost.total) + " (" + cost + ')');
            }
            NetWorkListenear.workCostMap.remove(hashCode);
            new Thread(){
                @Override