V
velusamypv
Hi,
The following is the logging mechanism used in the code i am
maintaining.
M_UM03_LOG_INFO ((M_UM03_INFO, "G_ul_DataValue1 = [%d], G_ul_DataValue2
= [%d], G_ul_DataValue3 = [%d], G_ul_DataValue4 = [%d],
G_ul_DataValue1, G_ul_DataValue2, G_ul_DataValue3, G_ul_DataValue4)) ;
Since the log line is very big, frequently we need to use horizontal
scroll to know what is logged.
To avoid horizontal scrolling, we did the following.
M_UM03_LOG_INFO ((M_UM03_INFO, "G_ul_DataValue1 = [%d], \
G_ul_DataValue2 = [%d], G_ul_DataValue3 = [%d], \
G_ul_DataValue4 = [%d]", G_ul_DataValue1, G_ul_DataValue2, \
G_ul_DataValue3, G_ul_DataValue4)) ;
But the above is also no good because the additional spaces " " will
be added to the log which is prepended in every line. i.e, the follwing
shall be printed.
"G_ul_DataValue1 = [1], G_ul_DataValue2 = [2], G_ul_DataValue3 =
[3], G_ul_DataValue4 = [4]"
Please suggest me to do this better. We already have the option of
using multiple log statements. But, Is there any way to change the one
line log for better code readability ?
I have tried an option of concatenation like "string1"+"string2" which
i remember have worked in some environment. Here the compiler is
throwing an error.
Thanks
The following is the logging mechanism used in the code i am
maintaining.
M_UM03_LOG_INFO ((M_UM03_INFO, "G_ul_DataValue1 = [%d], G_ul_DataValue2
= [%d], G_ul_DataValue3 = [%d], G_ul_DataValue4 = [%d],
G_ul_DataValue1, G_ul_DataValue2, G_ul_DataValue3, G_ul_DataValue4)) ;
Since the log line is very big, frequently we need to use horizontal
scroll to know what is logged.
To avoid horizontal scrolling, we did the following.
M_UM03_LOG_INFO ((M_UM03_INFO, "G_ul_DataValue1 = [%d], \
G_ul_DataValue2 = [%d], G_ul_DataValue3 = [%d], \
G_ul_DataValue4 = [%d]", G_ul_DataValue1, G_ul_DataValue2, \
G_ul_DataValue3, G_ul_DataValue4)) ;
But the above is also no good because the additional spaces " " will
be added to the log which is prepended in every line. i.e, the follwing
shall be printed.
"G_ul_DataValue1 = [1], G_ul_DataValue2 = [2], G_ul_DataValue3 =
[3], G_ul_DataValue4 = [4]"
Please suggest me to do this better. We already have the option of
using multiple log statements. But, Is there any way to change the one
line log for better code readability ?
I have tried an option of concatenation like "string1"+"string2" which
i remember have worked in some environment. Here the compiler is
throwing an error.
Thanks