[Feature][T106][task-view-1174] optimise network log

    Only Configure: No
    Affected branch: unknown
    Affected module: network
    Is it affected on both ZXIC and MTK: only ZXIC
    Self-test: yes
    Doc Update: no

Change-Id: I4b86ccd27a41e2703f66e592379fb14cd72bf851
diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-network/lynq_module_socket.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-network/lynq_module_socket.cpp
index cf51053..2a978cc 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-network/lynq_module_socket.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-network/lynq_module_socket.cpp
@@ -156,7 +156,7 @@
             (*iter)->readInt32(&wakeup_token);

             if(wakeup_token==waitToken)

             {

-                LYINFLOG("%s get waitToken",__func__);

+                LYINFLOG("%s get waitToken, cnt is %d",__func__,cnt);

                 p=(*iter);

                 p->setDataPosition(0);

                 s_recv_parcel_list.erase(iter);

@@ -172,7 +172,7 @@
         }        

     }

 waitResponse_end:

-    LYINFLOG("%s wait token is %d wakeup_token is %d, cnt is %d",__func__,waitToken,wakeup_token,cnt);

+    LYDBGLOG("%s wait token is %d wakeup_token is %d, cnt is %d",__func__,waitToken,wakeup_token,cnt);

     pthread_cleanup_pop(0);

     BLOCK_RECV_MSG_UNLOCK(); 

     return wakeup_token==waitToken ? 0:LYNQ_E_TIME_OUT;

@@ -195,7 +195,6 @@
 */

 int GetHeader(Parcel* &p, lynq_resp_t& head)

 {

-    LYINFLOG("get header");

     if(p->dataAvail() > 0)

     {

         p->readInt32(&(head.resp_type));

@@ -304,11 +303,11 @@
         size=((responseType>>SHM_BUFFER_SIZE_OFFSET)&SHM_BUFFER_SIZE_MASK);

         if(size>=sizeof(int32_t)*3 && get_shem_buffer_level(size,&level))

         {

-            LYINFLOG("urc_data_is_in_shm_data level is %d, index is %d size is %d",level,index,size);

+            LYDBGLOG("urc_data_is_in_shm_data level is %d, index is %d size is %d",level,index,size);

                return true;                            

         }        

     }

-    LYINFLOG("urc_data_is_in_shm_data return false, responseType is %d",responseType);

+    LYDBGLOG("urc_data_is_in_shm_data return false, responseType is %d",responseType);

     return false;

 }

 /*hq add for urc broadcase optimisson 2023/01/03 end*/

diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-network/lynq_module_state_buffer.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-network/lynq_module_state_buffer.cpp
index 22a6fac..95323ed 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-network/lynq_module_state_buffer.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-network/lynq_module_state_buffer.cpp
@@ -99,7 +99,7 @@
 }
 
 void stop_network_timer(timer_t timer, int signal_value) {

-    LYINFLOG("stop_network_timer(), timer_id=%ld, signal_value=%d", (long)timer, signal_value);

+    LYDBGLOG("stop_network_timer(), timer_id=%ld, signal_value=%d", (long)timer, signal_value);

     struct itimerspec timespec;
     if(timer_gettime(timer, &timespec) == -1) {
         LYERRLOG("stop_network_timer(), get time fail(%s)", strerror(errno));

@@ -107,7 +107,7 @@
     }
     LYINFLOG("stop_network_timer(), tv_sec=%ld, tv_nsec=%ld",timespec.it_value.tv_sec, timespec.it_value.tv_nsec);

     if((timespec.it_value.tv_sec == 0)  && (timespec.it_value.tv_nsec == 0) ) {
-        LYINFLOG("stop_network_timer(), timer_id(%ld) had stopped, just return", (long)timer);

+        LYDBGLOG("stop_network_timer(), timer_id(%ld) had stopped, just return", (long)timer);

         return;
     } else {
         start_network_timer(timer, signal_value, 0);

@@ -177,6 +177,10 @@
     {

         valid=false;

     }

+    else

+    {

+        LYINFLOG("%s type %d valid is %d",__func__,type,valid);    

+    }

     s_state_buffer_valid[type] = valid;

     if(s_state_buffer_valid[type]==false)

     {

@@ -185,8 +189,7 @@
     else 

     {

         start_network_timer(s_state_buffer_timer[type], s_state_buffer_sig_value[type],s_state_buffer_cfg.valid_period[type]*1000);

-    }

-    LYINFLOG("%s type %d valid is %d",__func__,type,valid);    

+    }    

 }

 

 int get_state_buffer_valid(lynq_network_state_buffer_type type)

@@ -201,7 +204,7 @@
     

     if(is_period_equal_not_valid(s_state_buffer_cfg.valid_period[type]))

     {

-        LYINFLOG("%s type %d timer length %d is equal not valid",__func__,type,s_state_buffer_cfg.valid_period[type]);

+        LYDBGLOG("%s type %d timer length %d",__func__,type,s_state_buffer_cfg.valid_period[type]);

         return;

     }

         

@@ -223,7 +226,7 @@
     for(i=0;i<int_num;i++)

     {

         int_value=va_arg(pArgs, int);

-        LYINFLOG("%s int_value is %d",__func__,int_value);

+        LYINFLOG("int_value is %d",int_value);

         ret = write(fd_backup,&int_value,sizeof (int));

         if(ret<=0)

         {

@@ -243,7 +246,7 @@
     {

         p_value=va_arg(pArgs, char*);

         stringLen=strlen(p_value)+1;

-        LYINFLOG("%s p_value is %s,stringlen is %d",__func__,p_value,stringLen);

+        LYINFLOG("p_value is %s,stringlen is %d",p_value,stringLen);

         ret = write(fd_backup,&stringLen,sizeof(int));

         if(ret<=0)

         {

@@ -279,7 +282,7 @@
     

     if(!get_state_buffer_valid(type))

     {

-        LYINFLOG("%s type %d buffer not valid",__func__,type);

+        LYDBGLOG("%s type %d buffer not valid",__func__,type);

         return 1;

     }

 

@@ -302,14 +305,13 @@
     for(i=0;i<int_p_num;i++)

     {

         int_p_value=va_arg(pArgs, int*);        

-        ret = read(fd_backup,int_p_value,sizeof (int));

-        LYINFLOG("%s int_p_value is %d",__func__,(*int_p_value));

+        ret = read(fd_backup,int_p_value,sizeof (int));       

         if(ret<=0)

         {

             LYERRLOG("%s read int %d fail, ret is %d",__func__,i,ret);

             goto get_state_error_done;  

         }   

-        

+        LYINFLOG("int_p_value is %d",(*int_p_value));

     }

 

     int stringNum;

@@ -326,7 +328,7 @@
             LYERRLOG("%s get %d string len fail, ret is %d",__func__,i,ret);

             goto get_state_error_done;

         }

-        LYINFLOG("%s stringlen is %d",__func__,stringLen);

+        LYINFLOG("stringlen is %d",stringLen);

         p_value=va_arg(pArgs, char*);          

         ret = read(fd_backup,p_value,stringLen);

         if(ret<=0)

@@ -334,7 +336,7 @@
             LYERRLOG("%s get %d string fail, stringlen is %d,  ret is %d",__func__, stringLen,ret);

             goto get_state_error_done;

         } 

-        LYINFLOG("%s p_value is %s",__func__,p_value);

+        LYINFLOG("p_value is %s",p_value);

     } 

     va_end(pArgs);

 

diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-network/lynq_network.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-network/lynq_network.cpp
index c10be55..f0c0bba 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-network/lynq_network.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-network/lynq_network.cpp
@@ -388,9 +388,7 @@
             break;

         }

     }

-    LYINFLOG("CID in fUNC :%llu",*cellinfo);

-    LYINFLOG("tac in fUNC :%d",*tac);

-    LYINFLOG("earfcn in fUNC :%d",*earfcn);

+    LYINFLOG("CID:%llu, tac:%d, earfcn:%d",*cellinfo,*tac,*earfcn);   

     return RESULT_OK;    

 }

 

@@ -492,7 +490,7 @@
     }

     for(i=0; i<(*valid_number); i++)

     {

-        LYERRLOG("cell info %d is %d",i, cell_info[i]);

+        LYDBGLOG("cell info %d is %d",i, cell_info[i]);

     }    

     return RESULT_OK;    

 }

@@ -564,7 +562,7 @@
         }

     }

 

-    LYINFLOG("%s suc",__func__);   

+    LYDBGLOG("%s suc",__func__);   

     delete p;       

     return RESULT_OK;    

 }

@@ -596,7 +594,7 @@
     p->readInt32(&readnum);

     p->readInt32(netselMode);

 

-    LYINFLOG("%s suc",__func__);   

+    LYINFLOG("%s suc %d",__func__,*netselMode);   

     delete p;       

     return RESULT_OK;  

 }

@@ -647,7 +645,7 @@
         return ret;  

     }   

         

-    LYINFLOG("%s set mode %s mccmnc %s suc",__func__,mode,mccmnc);   

+    LYDBGLOG("%s set mode %s mccmnc %s suc",__func__,mode,mccmnc);   

     delete p;

     return RESULT_OK;  

 }

@@ -712,7 +710,7 @@
         }

     }

     delete p;

-    LYINFLOG("%s suc",__func__);   

+    LYDBGLOG("%s suc",__func__);   

     return RESULT_OK;  

 }

 

@@ -776,6 +774,7 @@
             *netRejected = atoi(resp[reject_index]);            

         }        

     }    

+    LYINFLOG("regstate:%d, CID:%s, LAC:%s, netType:%d, reject_code:%d",*regState,CID,LAC,*netType,*netRejected);

 

 registration_from_parcel_return:

 

@@ -899,6 +898,7 @@
             p->readInt32(imsRegState);

             p->readInt32(radioTechFam);

             set_state_to_buf(NETWORK_STATE_BUFFER_TYPE_IMS_REG,2,*imsRegState,*radioTechFam,0);

+			LYINFLOG("imsRegState:%d, radioTechFam:%d",*imsRegState,*radioTechFam);

         }

         else 

         {

@@ -912,7 +912,7 @@
 

     if(ret==RESULT_OK)

     {

-        LYINFLOG("%s suc",__func__); 

+        LYDBGLOG("%s suc",__func__); 

     }    

    

     delete p;

@@ -946,7 +946,7 @@
     p->readInt32(&num);

     p->readInt32(preNetType);  

     

-    LYINFLOG("%s suc",__func__); 

+    LYINFLOG("%s suc %d",__func__,*preNetType); 

     delete p;

     return RESULT_OK;  

 }

@@ -973,7 +973,7 @@
         return ret;  

     }   

     

-    LYINFLOG("%s set %d suc",__func__,preffertype);     

+    LYDBGLOG("%s set %d suc",__func__,preffertype);     

     delete p;

     return RESULT_OK;  

    

@@ -1011,7 +1011,7 @@
         copyCellInfoList(p,&cellinfo[i],&tac[i],&earfcn[i]);

     }

     

-    LYINFLOG("%s suc",__func__); 

+    LYDBGLOG("%s suc",__func__); 

     delete p;

     return RESULT_OK;  

 }

@@ -1171,7 +1171,7 @@
         

     }

     

-    LYINFLOG("%s suc",__func__); 

+    LYDBGLOG("%s suc",__func__); 

     delete p;

     return RESULT_OK;  

 }

@@ -1314,13 +1314,13 @@
     }

     memmove(data_str, data, data_len);     

     data_str[data_len]='\0';           

-    LYINFLOG("%s return string is %s",__func__,data_str);  

+    LYINFLOG("AT Rsp string is %s",data_str);  

     start = strstr(data_str,tagString);

     int local_valid_num=0;

     if(start!=NULL)

     {

          start=start+strlen(tagString);

-         length=strlen(start);

+         length=strlen(start)+1;

          for(i=0; i<length;i++)

          {

              if((!bfind) && (start[i] >= '0') && (start[i] <= '9'))

@@ -1339,16 +1339,12 @@
     }           

     else

     {

-         LYERRLOG("%s  can't find tag string",__func__,tagString);         

+         LYERRLOG("AT Rsp can't find tag %s",tagString);         

          ret=LYNQ_E_INNER_ERROR; 

     }

 

-    if(local_valid_num ==0)

-    {

-         LYERRLOG("%s  can't find integer",__func__);                 

-    }

     *valid_num = local_valid_num; 

-    LYINFLOG("%s ret is %d valid num is %d ",__func__,ret,*valid_num);  

+    LYINFLOG("AT Rsp ret is %d v num is %d",ret,*valid_num);  

     free(data_str);

     return ret;

 }

@@ -1591,10 +1587,10 @@
     p->readInt32(&solSigStren->rsrq);

     p->readInt32(&solSigStren->rssnr);

 

-    LYINFLOG("LTE_signalstrength:%d",solSigStren->lte_signalstrength);

     if(is_rssi_valid(solSigStren->lte_signalstrength))

     {

         solSigStren->lte_sig_valid = 1;

+        LYINFLOG("LTE_rsrp:%d",-solSigStren->rsrp);

     }else{

         solSigStren->lte_sig_valid = 0;

     }

@@ -1610,10 +1606,9 @@
     p->readInt32(&rscp);

     p->readInt32(&ecno);

     

-    

-    LYINFLOG("WCDMA_signalstrength:%d",solSigStren->wcdma_signalstrength);

     if(is_rssi_valid(solSigStren->wcdma_signalstrength))

     {

+        LYINFLOG("W_ss:%d",solSigStren->wcdma_signalstrength);

         solSigStren->wcdma_sig_valid = 1;

         convert_rscp(rscp,&solSigStren->rscp);

         convert_ecno(ecno,&solSigStren->ecno);

@@ -1631,13 +1626,13 @@
         p->readInt32(&solSigStren->csiRsrp);

         p->readInt32(&solSigStren->csiRsrq);

         p->readInt32(&solSigStren->csiSinr);

+        LYINFLOG("Nr_ssrp:%d",-(solSigStren->ssRsrp));

     }

     else{

-        LYERRLOG("None of NR signal info");

         solSigStren->nr_sig_valid = 0;

     }        

 

-    LYINFLOG("%s suc",__func__);  

+    LYDBGLOG("%s suc",__func__);  

     delete p;

     return RESULT_OK;    

 }

@@ -1809,7 +1804,7 @@
             if(is_rssi_valid(s_network_urc_solSigStren.lte_signalstrength))

             {

                 s_network_urc_solSigStren.lte_sig_valid = 1;

-                LYINFLOG("urc_LTE_signalstrength:%d",s_network_urc_solSigStren.lte_signalstrength);

+                LYINFLOG("urc_L_rsrp:%d",-(s_network_urc_solSigStren.rsrp));

             }else{

                 s_network_urc_solSigStren.lte_sig_valid = 0;

             }

@@ -1827,7 +1822,7 @@
                 s_network_urc_solSigStren.wcdma_sig_valid = 1;

                 convert_rscp(rscp,&s_network_urc_solSigStren.rscp);

                 convert_ecno(ecno,&s_network_urc_solSigStren.ecno);

-                LYINFLOG("urc_WCDMA_signalstrength:%d",s_network_urc_solSigStren.wcdma_signalstrength);                

+                LYINFLOG("urc_W_ss:%d",s_network_urc_solSigStren.wcdma_signalstrength);                

             }else{

                 s_network_urc_solSigStren.wcdma_sig_valid = 0;

             }

@@ -2015,7 +2010,7 @@
         }

     }

 

-    LYINFLOG("%s ret is %d",__func__,ret);  

+    LYDBGLOG("%s ret is %d",__func__,ret);  

     delete p;

     return ret;                

 }

diff --git a/cap/zx297520v3/src/lynq/lib/liblynq-qser-network/lynq_qser_network.cpp b/cap/zx297520v3/src/lynq/lib/liblynq-qser-network/lynq_qser_network.cpp
index bdf4caa..9ad0b0c 100755
--- a/cap/zx297520v3/src/lynq/lib/liblynq-qser-network/lynq_qser_network.cpp
+++ b/cap/zx297520v3/src/lynq/lib/liblynq-qser-network/lynq_qser_network.cpp
@@ -873,7 +873,7 @@
         int rt = pthread_create(&s_new_network_tid, NULL, new_network_thread_recv, NULL);
         if(rt < 0)
         {
-            LYDBGLOG("%s pthread_create error!!!",__func__);
+            LYERRLOG("%s pthread_create error!!!",__func__);
             s_handlerPtr=NULL;
             s_contextPtr=NULL;
             s_new_network_tid=-1;