Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
SLF4J Parameterized Logging Example
// this
if ( logger.isDebugEnabled() ) {
logger.debug("Some code with a parameter: " + param1 + " - " + param2 + " - " + param3);
}
// becomes this
logger.debug("Some code with a parameter: {} - {} - {}", param1, param2, param3");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment