A common use of ParameterizedMessage in the ES codebase is to facilitate lazy evaluation of message arguments. ParameterizedMessage predates some of the newer lambda shaped Supplier-accepting log variants. Quite often using a String or argument Supplier is just as good, more readably, and likely slightly more efficient.
Within server there are the following usages:
$ find server/src/main/java/ -name "*.java" -exec grep org.apache.logging.log4j.message.ParameterizedMessage {} \; -print | grep -e "\.java$" | sed "s/\/[a-zA-Z0-9]*.java$//" | sort | uniq | sed "s/^server/- [ ] server/"
for majority of use case a structured replace refactoring from intellij will be good option
relates #84478
A common use of ParameterizedMessage in the ES codebase is to facilitate lazy evaluation of message arguments. ParameterizedMessage predates some of the newer lambda shaped Supplier-accepting log variants. Quite often using a String or argument Supplier is just as good, more readably, and likely slightly more efficient.
Within server there are the following usages:
for majority of use case a structured replace refactoring from intellij will be good option
relates #84478