question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Logs many FOP DEBUG messages

See original GitHub issue

Expected Behavior

Rendering a PDF using DITA-OT 3.1 will not show any FOP logging messages, as described in FOP debug logging (http://www.dita-ot.org/3.1/topics/log-files.html).

Actual Behavior

Logs many FOP DEBUG messages, siginificantly slowing down build time.

For comparison: build time using DITA-OT 2.4.6 was 4-5 times quicker.

Copy of the error message, log file or stack trace

Small excerpt of the logs, notice the small increments in time (since it logs so much):

[...]
      [fop] 14:00:41.561 [main] DEBUG org.apache.fop.pdf.PDFObject - Embedded Tr
ueType/OpenType font
      [fop] 14:00:41.563 [main] DEBUG org.apache.fop.pdf.PDFObject - Writing 263
84 bytes of TTF font data
      [fop] 14:00:41.565 [main] DEBUG org.apache.fop.pdf.PDFObject - Embedded Tr
ueType/OpenType font
[...]

Environment

  • DITA-OT version: 3.1
  • Operating system and version: Windows 7 x64
  • How did you run DITA-OT? "%DITA_HOME%/bin/ant" -f "%DITA_HOME%/build.xml" -Dbasedir="." -Dargs.input="path/to/file.ditamap" -Doutput.dir="pdf" -Dtranstype=pdf
  • Transformation type: PDF

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jelovirtcommented, Jun 20, 2018

Ok, so the reason is that while Ant is able read the libraries from lib directory, it doesn’t have the config/logback.xml configuration that’s needed to configure the logging levels.

The bin/ant and bin/ant.bat are distributed just for backward compatibility and we really should remove them because they cause problems like these when ran without correct configuration.

Closing this as not a bug, the log configuration works as expected when used with e.g. -lib %DITA_HOME%\config

0reactions
c-kunzcommented, Jun 20, 2018

I neither have a global CLASSPATH set nor ANT_HOME. As far as I’m concerned I’m solely relying on running DITA-OT using the Batch script %DITA_HOME%/bin/ant.bat.

I’ve looked into that script, and found the following section, which I can confirm is being called: https://github.com/dita-ot/dita-ot/blob/bfba3b912c35dc58686c3a2b168e41f5b7c82c77/src/main/bin/ant.bat#L137-L138

These are the environment variables in the above command and its values at runtime:

Environment variable Value
%_JAVACMD% C:\Program Files\Java\jdk1.8.0_162\bin\java.exe
%ANT_OPTS%
%ANT_HOME% C:\Program Files\dita-ot-3.1\bin..
%ANT_ARGS%
%ANT_CMD_LINE_ARGS% -f “C:\Program Files\dita-ot-3.1/build.xml” -Dbasedir “.” -Dargs.input “path\to\file.ditamap” -Doutput.dir “pdf” -Dtranstype pdf

I hope that helps 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

Apache(tm) FOP: Events/Processing Feedback
The event system allows to react on these events. On this page, we won't discuss logging as such. We will show how the...
Read more >
How can I disable the strerr logging output from FOP?
I've tried putting a log4j.properties file in the classpath, changing the log-level for org.apache.fop but this hasn't worked.
Read more >
Log Messages in FOP. - fop-users@xmlgraphics.apache.org
FOP uses Apache Commons Logging [1]. So you have to set up the backing logging implementation (be that Log4J, java.util.logging or whatever) accordingly....
Read more >
How to Enable Debugging for FO Processor Transformations
If you encounter errors when running PDF transformations that use an FO processor, it is possible to enable debugging/logging to help you identify...
Read more >
How to stop logging external jar debug statements
Log4j is used for logging and in my appender's threshold is set to "debug". I only want debug output of my app not...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found