Details
-
Documentation
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
2.11.1
-
Any project with log4j using as configuration a file like the one attached as example.
With this configuration, logs will be printed as ${defaultLayout} instead of the actual message.
Description
Tweaking my log configuration I found out that if the <Properties> is not placed at the beginning of the config just after the <Configuration> tag, the property substitution is not performed at all.
Looking at the documentation I haven't seen anything related to the ordering of the elements in the config files. If there's a good reason that the properties should be placed first place in configuration, it'd be a good idea to note it somewhere in the documentation.
Commit 60b275d3d07b1a73a1bd639e49c64f670aec8895 in logging-log4j2's branch refs/heads/release-2.x from Ralph Goers
[ https://gitbox.apache.org/repos/asf?p=logging-log4j2.git;h=60b275d ]
LOG4J2-2500- update documentation to say properties element must be first