-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
JSON custom formatter #2861
Comments
Neither compile errors nor source code are provided, so we have no idea what we are dealing with. |
oh sorry, I'm trying to set up JSON logging with spdlog, so I'm using the following custom formatter
Then the usage looks like this:
but I got an fmt compilation error due to requiring a formatter
Thanks! |
You need to define a https://github.com/fmtlib/fmt/blob/9.0.0/ChangeLog.rst#900---2022-07-04
See: https://fmt.dev/9.1.0/api.html#std-ostream-support template <> struct fmt::ostream<SimpleJSON> : fmt::ostream_formatter {}
}
Another way: https://fmt.dev/9.1.0/api.html#formatting-user-defined-types |
Thanks! |
I'm still getting a fmt compilation errors due to requiring a formatter
Originally posted by @maordadush in #1797 (comment)
The text was updated successfully, but these errors were encountered: