You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by "Piotr Karwasz (Jira)" <ji...@apache.org> on 2022/09/12 19:44:00 UTC
[jira] [Commented] (LOG4J2-3592) Log4j 2.17.2 version not able to resolve system variable in log4j2.xml file
[ https://issues.apache.org/jira/browse/LOG4J2-3592?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17603239#comment-17603239 ]
Piotr Karwasz commented on LOG4J2-3592:
---------------------------------------
Hi [~punditavi@gmail.com],
This is due to LOG4J2-3317: only the {{Property}} elements in your configuration will be evaluated recursively for security reasons.
All other sources are evaluated only once.
> Log4j 2.17.2 version not able to resolve system variable in log4j2.xml file
> ---------------------------------------------------------------------------
>
> Key: LOG4J2-3592
> URL: https://issues.apache.org/jira/browse/LOG4J2-3592
> Project: Log4j 2
> Issue Type: Question
> Reporter: Abhilash
> Priority: Blocker
>
> Hi Team,
>
> We were using log4j 2.17.1 version and we were not facing any issue while resolving the system variable placeholder in log4j2.xml file.
>
> Post upgrading to 2.17.2 or 2.18.0 we are the log4 lib not replacing the place holder with provided system variable.
>
> our configuration:
> *log4j2.xml*
> <Properties>
> <Property name="logpath">${bundle:config:aap.LogPath}</Property>
> </Properties>
>
> *config.properties*
> LogPath=/logs/appName/{*}${sys:appEnvironment}/${sys:instanceName}{*}
>
> The above *${sys:appEnvironment} and* *${sys:instanceName}* are not resolving after 2.17.2 onwards.
>
> There is mandate that we no longer can use the 2.17.1 version in our company due to security reasons so using 2.17.2 or above is a must but we are blocked due to the above filepath issue.
>
> Kindly guide us on this to fix it. Thank you. **
--
This message was sent by Atlassian Jira
(v8.20.10#820010)