disable log_info when calling Model

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Kaiwen Yang
Posts: 45
Joined: Mon Sep 03, 2018 11:25 am

disable log_info when calling Model

Post by Kaiwen Yang » Sat Sep 05, 2020 4:41 am

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

Tags:

User avatar
Carmichael Ong
Posts: 401
Joined: Fri Feb 24, 2012 11:50 am

Re: disable log_info when calling Model

Post by Carmichael Ong » Fri Sep 11, 2020 9:20 am

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

User avatar
Kaiwen Yang
Posts: 45
Joined: Mon Sep 03, 2018 11:25 am

Re: disable log_info when calling Model

Post by Kaiwen Yang » Fri Sep 11, 2020 7:42 pm

Thank you. I am able to solve the logging issue. I hope this will be included in 4.2

POST REPLY