The purpose of this repository is to provide a minimal, reproducible example in order to debug the behavior of YARP yInfo function when it is executed in either yarplogger or console context.
Follow the source installation of the robotology-superbuild.
mkdir build
cd build
cmake ..
make
sudo make install
Terminal #1
yarpserver
Terminal #2
test_yInfo
Terminal #1
yarpserver
Terminal #2
yarplogger
Terminal #3
yarpmanager
- In the yarplogger window, start the logger using the start green button ▶
- In the yarpmanager window, double click on the application called Debug_yInfo_App, click on test_info module and run using the green start button ▶.
- Now in the yarplogger window, you should be able to see the current log session. Double click on it and look at the output.
⚠ Don't forget to setup the YARP_FORWARD_LOG_ENABLE
environment variable.
As we said the yarplogger
may not trace all the yInfo
function calls. To check this automatically, you can run the check_log_file.sh passing a .log
file as an argument (see the example below)
./check_log_file.sh build/yarprunlog_04_07_2021_23_41_24.log
Parsing log file...
Missing value 3224, previous was at [ Time delay ]: 0.0001 Counter value: 3223
Missing value 3512, previous was at [ Time delay ]: 0.0001 Counter value: 3511
Missing value 3513, previous was at
Missing value 3514, previous was at
Missing value 3515, previous was at
Missing value 8594, previous was at [ Time delay ]: 0.0001 Counter value: 8593
Missing value 8595, previous was at
Missing value 8596, previous was at
Done.
Each time that the yarplogger
has missed to track a yInfo call, the script will disaply a Missing ...
line.
A Missing ...
reports:
- the missed value
- the current time delay used between 2 consecutives
yInfo
function calls. - the last value tracked before the loss.
Note
If you change the number of values to generate, in main.cpp, you also have to update the total
variable within the check_log_file.sh.