Add `loguru::printf_tag` to force printf syntax. Closes #49
This seemed like the best way to handle the issue. All internal log calls pass the printf_tag tag, and thereby use the correct formatting.
Ah, i see this creates issues with the c-style varargs. could we get rid of those by now? otherwise ill just keep this around on my fork
Sorry for the slow response to this.
This is a rather clever solution, however I am considering maybe doing something more breaking instead. I already have a separate suffix for stream logging (LOG_S etc), so maybe a separate suffix for fmtlib, e.g. LOG_FMT. So it would be:
LOG_F(INFO, "Hello %s", "world");
LOG_S(INFO) << "Hello " << "world";
LOG_FMT(INFO, "Hello {}", "world");
and all three could work in the same code base.
Thoughts?
Probably the best way to do it - I already define aliases to all logging macros in my code, so the extra two chars dont bother me, dont know about other people though