Log4j.properties doesn't turn off output
I have a Java project ami
that has a dependency on my package pdf2svg
that has a dependency on Apache PDFBox 1.8.7
. PDFBox
outputs a lot of debug information from (for example org.apache.pdfbox.pdmodel.font.PDSimpleFont
) that I want to disable.
732 [main] DEBUG org.xmlcml.pdf2svg.PDFPage2SVGConverter - startStream
2243 [main] DEBUG org.apache.pdfbox.pdmodel.font.PDSimpleFont - Debug: 'WinAnsiEncoding' isn't a predefined map, most likely it embedded in the pdf itself.
2246 [main] DEBUG org.apache.pdfbox.pdmodel.font.PDSimpleFont - Debug: 'WinAnsiEncoding' isn't a predefined map, most likely it embedded in the pdf itself.
PDFBox cannot be edited and I want to disable DEBUG. I have src/main/resources/log4j.properties
files in pdf2svg
and ami
which currently contain the following
# See the License for the specific language governing permissions and
# limitations under the License.
#
log4j.rootLogger=DEBUG, A1
log4j.appender.A1=org.apache.log4j.ConsoleAppender
log4j.appender.A1.layout=org.apache.log4j.PatternLayout
log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n
log4j.logger.uk.ac.cam=DEBUG
log4j.logger.org.xmlcml.cml.converters.molecule.cml.CML2CMLConverter=ALL
log4j.logger.org.apache.pdfbox.util=INFO
log4j.logger.org.apache.pdfbox.util.PDFStreamEngine=INFO
log4j.logger.org.apache.pdfbox.pdfparser.PDFObjectStreamParser=INFO
log4j.logger.org.apache.pdfbox.cos.COSDocument=ERROR
log4j.logger.org.apache.pdfbox.pdmodel.font.PDSimpleFont=ERROR
log4j.logger.org.apache.pdfbox.pdmodel.graphics.xobject.PDPixelMap=INFO
log4j.logger.org.apache.pdfbox.pdmodel.graphics.color.PDSeparation=OFF
log4j.logger.org.apache.pdfbox.pdmodel.graphics.color.PDColorState=ERROR
log4j.logger.org.apache.pdfbox.pdmodel.graphics.color.PDICCBased=INFO
some commands seem to work, but others like
log4j.logger.org.apache.pdfbox.pdmodel.font.PDSimpleFont=ERROR
do not disable the output. Does it matter where I put the log4j.properties file? Is there an obvious answer to this problem?
source to share
No one has answered this question yet
Check out similar questions: