opensim-core icon indicating copy to clipboard operation
opensim-core copied to clipboard

`OpenSim::log_cout()` does not print to `std::cout` for `Logger::Level::Warn` and higher

Open nickbianco opened this issue 1 year ago • 3 comments

OpenSim::log_cout() does not print output to std::cout when the Logger is set to Level::Warn or higher (i.e., Level::Debug prints, but Level::Error does not). This was detected for the following OpenSim::log_cout() calls in CasOC::Transcription:

https://github.com/opensim-org/opensim-core/blob/d9ebf9389fabfe9cceb8ab46122e90b69a07689e/OpenSim/Moco/MocoCasADiSolver/CasOCTranscription.cpp#L1143

and

https://github.com/opensim-org/opensim-core/blob/d9ebf9389fabfe9cceb8ab46122e90b69a07689e/OpenSim/Moco/MocoCasADiSolver/CasOCTranscription.cpp#L1163

nickbianco avatar Mar 21 '23 18:03 nickbianco

@nickbianco the connection to zero vector must have been very hard to establish, so this issue could have a higher priority. Thoughts on how often is this used? Also is this zero-vector issue the same symptoms reported mysteriously on some linux/docker containers?

aymanhab avatar Mar 22 '23 17:03 aymanhab

@aymanhab, this issue specifically didn't lead to the zero vector error, this is a separate issue that I noticed while fixing that one. The linux/docker container produced the same error message, but in that issue, there were no path constraints in the problem.

nickbianco avatar Mar 22 '23 18:03 nickbianco

I guess it's possible that fmt::format is also causing the issue in #3085. We could expand this issue or open another issue to investigate.

nickbianco avatar Mar 22 '23 18:03 nickbianco