robotology / osqp-eigen

Simple Eigen-C++ wrapper for OSQP library
https://robotology.github.io/osqp-eigen/
BSD 3-Clause "New" or "Revised" License
385 stars 114 forks source link

Add possibility (e.g. cmake flag) to disable or redirect error output #74

Closed kalj closed 3 years ago

kalj commented 3 years ago

Currently, there are hard coded unconditional error messages using std::cerr which cannot be disabled. It would be great if it would be possible to disable them, or perhaps define your own log callback which is invoked to print the messages. This would allow an application using osqp-eigen to incorporate these error messages in whatever logging framework it prefers.

S-Dafarra commented 3 years ago

Hi @kalj, thanks a lot for the suggestion. It makes definitely sense. It is something we did not consider while developing it. Also, feel free to open a PR for it.

cc @GiulioRomualdi