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 this previous question, I have the following log4j.properties file located in the /src/ directory.
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
I'm not sure what else I'm missing, because I'm still being spammed with messages like the following in console.
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
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.