Page 1 of 1

disable log_info when calling Model

Posted: Sat Sep 05, 2020 4:41 am
by yangkaiwen
Hello all,

I am using Matlab and C++ mexplus interface to do some optimization which involves iteratively calling

Model(const std::string& filename)

this results in thousands of "Loaded model XXX from file XXX.osim" printed on my Matlab command window. Is there a good way to disable log_info when I can call Model?

Kaiwen

Re: disable log_info when calling Model

Posted: Fri Sep 11, 2020 9:20 am
by ongcf
Seems like you're on the master branch which has the Logger added. If you built with Doxygen, you can check out the documentation for Logger there. If not, you can see the source here: https://github.com/opensim-org/opensim- ... n/Logger.h

In particular, see some of the methods for setLevel() starting here: https://github.com/opensim-org/opensim- ... gger.h#L74

Re: disable log_info when calling Model

Posted: Fri Sep 11, 2020 7:42 pm
by yangkaiwen
Thank you. I am able to solve the logging issue. I hope this will be included in 4.2