Skip to content

Instantly share code, notes, and snippets.

@zachelrath
Created February 15, 2022 15:36
Show Gist options
  • Save zachelrath/7f652f899a8789a4de4e06f228a52b3f to your computer and use it in GitHub Desktop.
Save zachelrath/7f652f899a8789a4de4e06f228a52b3f to your computer and use it in GitHub Desktop.
Log4j structured logging with a Map
logger.info(new ObjectMessage(Map.of(
"totalItems", orderItems.size(),
"items", orderItems
)));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment