-Dlog4j.formatMsgNoLookups=true OR -Dlog4j2.formatMsgNoLookups=true - which is correct?

Viewed 3981
1 Answers

Edit: As remarked by Markono1234 this particular property was introduced in Log4j 2.10 and the only correct form is log4j2.formatMsgNoLookups (cf. source code).

Most remaining properties have two forms: a pre-2.10 log4j.* legacy property name and a new normalized log4j2.* name. See Log4j system properties for details:

Note that beginning in Log4j 2.10, all system property names have been normalized to follow a consistent naming scheme. While the old property names are still supported for backwards compatibility, it is recommended to update configurations to use the new style.

Related