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

log4j2 config variableResolver Prefix and Suffix should configable

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • 2.12.1
    • None
    • Configurators
    • None

    Description

      current variableResolverPrefix=${ and variableResolverSuffix=}
      There will be a issue if the variable default value has "}"
      ie :
      ```
      ${env:logStdoutPattern:-%d

      {yyyyMMddHH:mm:ss}

      %-5p %c

      {20}:%L - %m%n}
      ```
      if we change the variableResolverPrefix, that will solve the problem
      ```log4j2.proprties
      variableResolverPrefix=$(
      variableResolverSuffix=)
      appender.console.layout.pattern=$(env:logStdoutPattern:-%d{yyyyMMddHH:mm:ss} %-5p %c{20}

      :%L - %m%n)
      ```
      ref PR: https://github.com/apache/logging-log4j2/pull/312

      Attachments

        Activity

          People

            Unassigned Unassigned
            qxo qxo
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: