logging-log4j2 icon indicating copy to clipboard operation
logging-log4j2 copied to clipboard

docs: Improve String concatenation best practice

Open ppkarwasz opened this issue 7 months ago • 0 comments

This change splits the "don't use String concatenation" best practice into two parts:

  • A recommendation concerning performance: string concatenation is not efficient if the logger is off.
  • A security recommendation: format string must be constants to prevent {} placeholder injection.

The ${dangerousLookup} part of the example is removed, since lookups are not executed since version 2.15.0

ppkarwasz avatar Mar 19 '25 21:03 ppkarwasz