Skip to content

Instantly share code, notes, and snippets.

@theothermattm
Created March 30, 2013 15:45
Show Gist options
  • Save theothermattm/5277168 to your computer and use it in GitHub Desktop.
Save theothermattm/5277168 to your computer and use it in GitHub Desktop.
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