Disable the noise #3493
Replies: 2 comments 9 replies
-
|
Your question sounds like an issue of Rust and C++ compatibility. If you can call the spdlog API to set the log level to WARNING, it is likely that the default log level was not set during the build. |
Beta Was this translation helpful? Give feedback.
-
|
No, I don't want to use spdlog at all. I have some computational, mathematical, Rust codes. I want to provide some additional PDE capabilities, and this is best done using Fenicsx-Dolfinx, which is Python and C++ (neither my languages of choice). The main user-facing API is Python, the C++ API is very limited. The C++ side of Dolfinx uses spdlog (https://github.com/search?q=repo%3AFEniCS%2Fdolfinx%20spdlog%3A%3Ainfo&type=code). My Rust code accesses Dolfinx through the Python API (to provide the extensibility) and the C++ API (for some performance-critical parts). Hence, it links to the Dolfinx library, and through that, to spdlog. But it never uses spdlog directly. It does not even know about it. But somehow, when built with debug symbols, I get all the Dolfinx |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Dolfinx uses spdlog for logging. When building a Rust binary, which uses both C++ and Python Dolfinx, with cargo in the default debug (as opposed to release) build mode, I get a lot of INFO noise from
spdlog::infocalls in Dolfinx. Dolfinx provides wrappers to set and get the spdlog level, but the default is already WARNING, and even setting it to ERROR does not remove the INFO noise.How does spdlog figure out that cargo is building in the default (fast) debug mode? Why does it not respect the set log levels? Is there any way to disable the noise that does not involve waiting decades for the release mode to build?
This only happens on my Armbian (Ubuntu) box. On macOS there's no noise.
Beta Was this translation helpful? Give feedback.
All reactions