quarkus-logging-json
quarkus-logging-json copied to clipboard
Return value.toString() from KeyValueStructuredArgument.toString()
When outputting logs locally we would disable json formatting and still would want to see the structured values in the logged message, e.g.,:
log.info("Test log of structured arg with value {}", kv("key", "value"));
Please override toString()
in KeyValueStructuredArgument to return value.toString()
There is no good solution when you have disabled the extension.
Only possible solution will be some string formatting, as there is no json generator available and trying to keep this extension small and without too many dependencies.
There will be too many opinions on this formatting, I think the best solution will be to extend KeyValueStructuredArgument
with your own implementation and use that.