[
https://issues.apache.org/jira/browse/LOG4J2-3258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17462333#comment-17462333
]
Ralph Goers commented on LOG4J2-3258:
-------------------------------------
I'm misunderstanding something. You say that properties that originate in the
properties second aren't resolved. I have an app that does
{code:java}
<RollingFile name="log4j"
fileName="${LOG_DIR}/${spring:spring.application.name}.json"
filePattern="${LOG_DIR}/archive/${spring:spring.application.name}.json.%d{yyyyMMdd_HH}-%i">
{code}
and it is working fine.
Second, I need to understand the use case for using the ContextMapLookup in the
name and fileName. Unless you are under the RoutingAppender this doesn't make a
lot of sense since configuration will most likely happen on the main thread the
first time and if you have a monitorInterval specified it could happen on any
thread, so expecting to find it like that seems risky.
> RollingFile fileName containing variables does not work on 2.17.0
> -----------------------------------------------------------------
>
> Key: LOG4J2-3258
> URL: https://issues.apache.org/jira/browse/LOG4J2-3258
> Project: Log4j 2
> Issue Type: Bug
> Components: Appenders
> Affects Versions: 2.17.0
> Environment: Java 17, Ubuntu 20.04.
> Reporter: Konstantinos Liakos
> Priority: Major
>
> A configuration like the below has stopped working since 2.17.0. The
> variables that originate from <Properties> are not resolved.
>
> {code:java}
> <RollingFile name="Rolling-${ctx:logFile}"
> fileName="${logs_dir}/${ctx:logFile}"{code}
>
> Works fine on 2.16.0.
>
--
This message was sent by Atlassian Jira
(v8.20.1#820001)