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

Wrapper Generate$ExtendedLogger name inconvenient on Linux

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.9.0
    • Component/s: None
    • Labels:
      None

      Description

      The $ExtendedLogger is interpreted as an environment variable.

      $ java -cp log4j-core-2.8.jar org.apache.logging.log4j.core.tools.Generate$ExtendedLogger \
               com.mycomp.ExtLogger DIAG=350 NOTICE=450 VERBOSE=550 > com/mycomp/ExtLogger.java
      
      Error: Main method not found in class org.apache.logging.log4j.core.tools.Generate, please define the main method 
      

      The workaround is to quote the class name:

      $ java -cp log4j-core-2.8.jar "org.apache.logging.log4j.core.tools.Generate$ExtendedLogger" \
               com.mycomp.ExtLogger DIAG=350 NOTICE=450 VERBOSE=550 > com/mycomp/ExtLogger.java
      

        Attachments

          Activity

            People

            • Assignee:
              remkop@yahoo.com Remko Popma
              Reporter:
              remkop@yahoo.com Remko Popma
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: