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

Only allow lookups in message, not in parameters.

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Duplicate
    • None
    • 2.15.0
    • None
    • None

    Description

      For example, If someone named "${java:os}", he registered an account, I want to log it.

       

      import org.apache.logging.log4j.LogManager
      
      fun main() {
        val logger = LogManager.getLogger("ww")
        val username = "\${java:os}"
        logger.error("username: {}",username)
      } 

       

      I want "username: ${java:os}", but got "username: Mac OS X 10.16, architecture: x86_64-64"

      If it is possible, could I have a flag to only lookup in message?

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              InkerBot InkerBot
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: