Replies: 1 comment
-
hey, dynamic format string is not supported, it has to be specified in compile time as the library is creating constexpr objects underneath. You can simulate it, something like this for example : std::string message("foo {}")
auto var = fmt::format(fmt::runtime(message), 1);
LOG_DEBUG(loggerp, "{}", var) You can also look at related #361 This eventually is adding formatting overhead on the hot path rather than the backend logging thread, but it is not easy to support dynamic format strings |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Sorry if this is obvious, but I've been banging my head against a wall trying to figure it out
with fmt I can do
and it will work
if I try
LOG_DEBUG(loggerp, message, 1) or LOG_DEBUG(loggerp, fmt::runtime(message), 1)
I'm getting
error: use of local variable with automatic storage from containing function.
The end goal is to log a dynamic string. Really great library btw!
Beta Was this translation helpful? Give feedback.
All reactions