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

Wrapper Generate$ExtendedLogger name inconvenient on Linux

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.9.0
    • None
    • 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

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            rpopma Remko Popma
            rpopma Remko Popma
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment