Inna created LOG4J2-2913:
----------------------------
Summary: Bundle Lookup Bug
Key: LOG4J2-2913
URL: https://issues.apache.org/jira/browse/LOG4J2-2913
Project: Log4j 2
Issue Type: Bug
Components: Core, Lookups
Affects Versions: 2.8.2
Environment: Java Servler Web application + log4j2, with following
dependencies:
<dependency> <groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-api</artifactId> <version>2.8.2</version> </dependency>
<dependency> <groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-core</artifactId> <version>2.8.2</version> </dependency>
<dependency> <groupId>org.apache.logging.log4j</groupId>
<artifactId>log4j-web</artifactId> <version>2.13.3</version> </dependency>
<dependency> <groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId> <version>1.7.5</version>
</dependency>
<dependency> <groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId> <version>1.7.5</version>
</dependency>
Reporter: Inna
When Bundle Lookup Variable is inside the variable default value delimiter
structure, it always is null, so whole expression is taking the default value.
${bundle:bundleName:propertyName:-${someDefaultValue}} - it always is
someDefaultValue because bundle:bundleName:propertyName is always null.
As I see, the problem is in Interpolator.class, constructor Interpolator(final
Map<String, String> properties). There's no mapping for bundles, there should
be something like this: lookups.put("bundle", new ResourceBundleLookup())
I also described problem
[here|[https://stackoverflow.com/questions/63499944/apache-log4j2-strsubstitutor-default-variable-does-not-work]].
--
This message was sent by Atlassian Jira
(v8.3.4#803005)