Uploaded image for project: 'Pig'
  1. Pig
  2. PIG-4430

Pig should support reading log4j.properties file from classpath as well

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 0.15.0
    • None
    • None
    • Patch Available
    • Reviewed

    Description

      Currently, we can specify a log4j.properties file to Pig command line like so

      pig -4 /path/to/log4j.properties
      

      It will be quite helpful if it read the log4j.properties from the classpath as well.
      For instance in the same command we can specify...

      pig -4 log4j.properties
      

      And Pig can first try to read it as a file and failing that could try reading it from the classpath, similar to how log4j handles the property - log4j.configuration.

      We needed this as one of your projects contained the log4j.properties file embedded inside the project jar

      I've attached a simple patch with a testcase to that effect.

      Attachments

        1. log4j-2.patch
          5 kB
          Ratandeep Ratti
        2. log4j.patch
          5 kB
          Ratandeep Ratti

        Activity

          People

            rdsr Ratandeep Ratti
            rdsr Ratandeep Ratti
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: