Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Lord-Kamina opened this issue Sep 24, 2024 · 1 comment

Comments

@Lord-Kamina
Copy link

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
Copy link
Contributor

tt4g commented Sep 24, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants