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

Log4jContextListener: Support property substitution in context-params

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0-beta5
    • Fix Version/s: 2.0-beta7
    • Component/s: None
    • Labels:
      None

      Description

      Similar to the property substitution options offered in log4j2.xml, it would be useful to allow for property substitution in the context-params for configuring Log4jContextListener.

      For example, we'd like to be able to do the following:
      <context-param>
      <param-name>log4jConfiguration</param-name>
      <param-value>${env:myVar}.log4j2.xml</param-value>
      </context-param>

      And have the value of myVar replaced at runtime.

      (in our case, we have integration / production systems that have 1 environment variable set that controls the behavior of multiple deployed applications, each of which have different config files for each environment)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              timtucker Tim Tucker
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: