gabime / spdlog

Fast C++ logging library.
Other
24.39k stars 4.55k forks source link

Is it possible to change log level names (and associated colors) using the compiled library version of spdlog? #3201

Open Lord-Kamina opened 1 month ago

Lord-Kamina commented 1 month ago

The title is pretty self-explanatory.

I've tried with


// "MY ERROR", "MY CRITICAL", "OFF" }```
Both via CMake and also directly in my headers, before including the spdlog headers, and it doesn't seem to be making a difference.

I also know for a fact my definition in CMake is working because if I leave both the one in CMake and the one in my header, I get a macro redefined error.

Is this possible, or will I be forced to use the library as header-only?

What about the associated colors in the console sink? Can these be easily changed, or I will I need to subclass or reimplement the colored console sink?
tt4g commented 1 month ago

Since the macros are referenced when the library is built, it is not possible to change the macros when using the library.