Am 18.04.2020 um 18:18 schrieb Nick Westerly:
Hi -
I am using PDFBOX in my application through maven. Using version 2.0.15, I
already have different logging in my application now, however, I also
notice that PDF box has its own logging, and I'd like to also log PDFBOX
output to a logfile when needing to debug it.
Is there any way that if I've already built my jar (containing pdfbox)
through command line parameters, I can get PDFBOX to log its DEBUG output
to a log file? A little confusing whether we do this through log4j or
through apache commons parameters.
i.e. java -jar my.jar -Dlog4j.logger.org.apache.component=DEBUG
-Dlog4j.appender.fileLogger.File=/opt/logs/example.log
or something similar?
What worked for me is
-Dlog4j.configuration=file:./log4j.xml
and in log4j.xml you have your configuration. You need to add the log4j
jar(s) to your classpath.
Tilman
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org