Uploaded image for project: 'Log4j 2'
  1. Log4j 2
  2. LOG4J2-3470

Expressions in property values are not expanded anymore

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Not A Problem
    • 2.17.2
    • None
    • None
    • None
    • Running with / in:

      • Spring Boot 2.6.6
      • log4j 2.17.2
      • Docker / K8s on Amazon EKS
      • Java 11

    Description

      In our logging submodule we are using log4j2 properties with value expressions to do things, e. g.

      <Property name="thing:Environment" value="${env:ENVIRONMENT}" />
      <Property name="thing:Instance" value="${env:HOSTNAME}" />
      

      However, since we upgraded to 2.17.2, the expressions are not (always) expanded anymore, i. e. the log will contain environment:${env:ENVIRONMENT} rather than environment:my-fancy-env.

      The behavior is reproducible, however different applications behave differently, i. e. the same configuration yields different results (as in a race condition). The behavior is the same for the same config and application.

      Our current workaround is to downgrade to 2.17.1 for the time being.

      Is there maybe a connection to recently introduced raw values? Is this related to LOG4J2-3434?

      Attachments

        Activity

          People

            Unassigned Unassigned
            jamodd Jan Mosig
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: