You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Javier Armendáriz (JIRA)" <ji...@apache.org> on 2018/11/06 16:46:00 UTC
[jira] [Created] (LOG4J2-2500) Property substitution not working if
tag is not placed at the beginning of configuration
Javier Armendáriz created LOG4J2-2500:
-----------------------------------------
Summary: Property substitution not working if <Properties> tag is not placed at the beginning of configuration
Key: LOG4J2-2500
URL: https://issues.apache.org/jira/browse/LOG4J2-2500
Project: Log4j 2
Issue Type: Bug
Components: Core
Affects Versions: 2.11.1
Environment: 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.
Reporter: Javier Armendáriz
Attachments: log4j2.xml
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.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)