I am solving a relatively large optimization problem in the project, and for each optimization iteration, I call logger->log(). One iteration may take up to 10 seconds, in which case logger->log() will be called only once every 10 seconds. I found that the bin file generated in /tmp is zero bytes for a while (for example, until the end of the first 20 iterations, that is around 200 sec for my case), and then becomes non-zero bytes when the program is terminated. While the bin file is zero bytes, mc_log_ui cannot visualize the log data. This is inconvenient, and I would like to visualize the log data at any time by updating the bin file after each iteration.
The behavior was same even when policy is mc_rtc::Logger::Policy::NON_THREADED.
I'm using
mc_rtc::Logger
as follows in the project which is not related to mc_rtc controller.Link to the codes (internal only): https://github.com/isri-aist/optmotiongen/blob/dcedbc70eb1234923c507c3366666f5feba1c1b9/optmotiongen/src/Problem/Problem.cpp#L23
I am solving a relatively large optimization problem in the project, and for each optimization iteration, I call
logger->log()
. One iteration may take up to 10 seconds, in which caselogger->log()
will be called only once every 10 seconds. I found that the bin file generated in/tmp
is zero bytes for a while (for example, until the end of the first 20 iterations, that is around 200 sec for my case), and then becomes non-zero bytes when the program is terminated. While the bin file is zero bytes,mc_log_ui
cannot visualize the log data. This is inconvenient, and I would like to visualize the log data at any time by updating the bin file after each iteration.The behavior was same even when policy is
mc_rtc::Logger::Policy::NON_THREADED
.