title: Changing PDFBox Logging Level
body: <p>I'm currently trying and failing to lower the logging level for the PDFBox 1.8.6 library I'm using in my java project. Based on <a href="https://stackoverflow.com/questions/11466610/disabling-logging-on-pdfbox">this previous question</a>, I have the following log4j.properties file located in the /src/ directory. </p>
  
  <pre><code>log4j.rootLogger=ERROR, stdout
  
  log4j.logger.org.apache.pdfbox=ERROR
  
  # Direct log messages to stdout
  log4j.appender.stdout=org.apache.log4j.ConsoleAppender
  log4j.appender.stdout.Target=System.out
  log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
  log4j.appender.file.layout.ConversionPattern=%d{ISO8601} %-5p [%c{2}]: %m%n
  </code></pre>
  
  <p>I'm not sure what else I'm missing, because I'm still being spammed with messages like the following in console.</p>
  
  <pre><code>Jul 10, 2014 10:19:23 AM org.apache.pdfbox.pdfparser.PDFParser parseXrefTable
  WARNING: Count in xref table is 0 at offset 223265
  Jul 10, 2014 10:19:23 AM org.apache.pdfbox.pdfparser.PDFParser parseXrefTable
  WARNING: Count in xref table is 0 at offset 223265
  Jul 10, 2014 10:19:23 AM org.apache.pdfbox.pdfparser.PDFParser parseXrefTable
  WARNING: Count in xref table is 0 at offset 223265
  </code></pre>
  
  <p>If there's a way to change the log level programmatically, I'm not attached to the properties file at all since I don't use log4j anywhere else. I don't know if it's even using the log4j.properties file at all. I'm using Eclipse, I'm not certain how to confirm that the log4j.properties file is on the classpath as intended.</p>