title: Pig Batch mode: how to set logging level to hide INFO log messages?
body: <p>Using Apache <strong>Pig version 0.10.1.21</strong> (rexported). When I execute a pig script, there are a lots of INFO logging lines which looks like that: </p>
  
  <pre><code>2013-05-18 14:30:12,810 [Thread-28] INFO  org.apache.hadoop.mapred.Task - Task 'attempt_local_0005_r_000000_0' done.
  2013-05-18 14:30:18,064 [main] WARN  org.apache.pig.tools.pigstats.PigStatsUtil - Failed to get RunningJob for job job_local_0005
  2013-05-18 14:30:18,094 [Thread-31] WARN  org.apache.hadoop.mapred.JobClient - No job jar file set.  User classes may not be found. See JobConf(Class) or JobConf#setJar(String).
  2013-05-18 14:30:18,114 [Thread-31] INFO  org.apache.hadoop.mapreduce.lib.input.FileInputFormat - Total input paths to process : 1
  2013-05-18 14:30:18,254 [Thread-32] INFO  org.apache.hadoop.mapred.Task -  Using ResourceCalculatorPlugin : org.apache.hadoop.util.LinuxResourceCalculatorPlugin@3fcb2dd1
  2013-05-18 14:30:18,265 [Thread-32] INFO  org.apache.hadoop.mapred.MapTask - io.sort.mb = 10
  </code></pre>
  
  <p>Is there a SET command within the pig script or a command line flag to allow the logging level? Basically I would like to hide the [Thread-xx] INFO messages. Only showing WARNING and ERROR. I have tried the command line debug flag. Unfortunately, the INFO messages still show up:</p>
  
  <pre><code>pig -x local -d WARN MyScript.pig
  </code></pre>
  
  <p>Hope there is a solution. Thanks in advance for any help.</p>
  
  <p><strong>SOLVED</strong>: Answer <a href="https://stackoverflow.com/questions/16410489/how-do-i-suppress-the-bloat-of-useless-information-when-using-the-dump-command-w">by Loran Bendig, set the log4j.properties</a>. Summarized here for convenience</p>
  
  <p>Step1: copy the log4j config file to the folder where my pig scripts are located.</p>
  
  <pre><code>cp /etc/pig/conf.dist/log4j.properties log4j_WARN
  </code></pre>
  
  <p>Step2: Edit log4j_WARN file and make sure these two lines are present</p>
  
  <pre><code>log4j.logger.org.apache.pig=WARN, A
  log4j.logger.org.apache.hadoop = WARN, A
  </code></pre>
  
  <p>Step3: Run pig script and instruct it to use the custom log4j</p>
  
  <pre><code>pig -x local -4 log4j_WARN MyScript.pig
  </code></pre>