-
When working with maps, I find myself always wanting to build an object like this:
The resulting output when then be formatted like this:
The contents of the map items would be wrapped nicely together in this case. I don't see any other way to do this cleanly. |
Beta Was this translation helpful? Give feedback.
Answered by
philsttr
Feb 20, 2021
Replies: 1 comment 1 reply
-
Try this (using a structured argument)... log.debug("Request/Response info", kv("debug_http", Map.of(
"request_method", request.getMethod(),
"request_uri", request.getURI()
))); or this (using a marker)... log.debug(Markers.append("debug_http", Map.of(
"request_method", request.getMethod(),
"request_uri", request.getURI()
)), "Request/Response info"); |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
philsttr
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Try this (using a structured argument)...
or this (using a marker)...