Skip to content

SPDLOG_LOGGER_CALL with additional data and custom formatting #3012

Answered by tt4g
AndyDralle asked this question in Q&A
Discussion options

You must be logged in to vote

Additional log arguments are formatted by the fmt library, so a custom data formatter for fmt must be defined.
See: https://fmt.dev/9.1.0/api.html#formatting-user-defined-types

However, spdlog does not have an API to output log data as JSON format.
This should be customized by the developer.
See: #1797

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Answer selected by AndyDralle
Comment options

You must be logged in to vote
1 reply
@tt4g
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants