how to configure log4j logging for Ant FOP task?
Posted: Mon Sep 11, 2017 11:51 pm
Hi,
I have trouble getting logging right for an ANT transformation scenario that invokes a FOP task. Consider this simple Ant task:
...when I execute this with following jars on the classpath:
I'm getting following output for the Ant task in the transformation output pane:
However, if I remove the ${oxygenHome}/lib/log4j.jar from the classpath, I am getting all regular FOP output in the transformation output pane.
Yet, I'm not sure if ${oxygenHome}/lib/log4j.jar is the recommended way of controlling logging in an Oxygen transformation scenario. If so, how should I configure log4j logging properly for ${oxygenHome}/lib/xmlgraphics-commons-2.1.jar (which is containing the org.apache.xmlgraphics.image.loader.spi.ImageImplRegistry class)?
Best,
Ron
I have trouble getting logging right for an ANT transformation scenario that invokes a FOP task. Consider this simple Ant task:
Code: Select all
<target name="transform-pdf">
<fop format="application/pdf"
fofile="test.fo"
outfile="test.pdf"
messagelevel="debug"/>
</target>
Code: Select all
${oxygenHome}/lib/fop.jar
${oxygenHome}/lib/batik-all-1.8.jar
${oxygenHome}/lib/commons-logging-1.2.jar
${oxygenHome}/lib/avalon-framework-api-4.3.1.jar
${oxygenHome}/lib/avalon-framework-impl-4.3.1.jar
${oxygenHome}/lib/commons-io-1.3.1.jar
${oxygenHome}/lib/xmlgraphics-commons-2.1.jar
${oxygenHome}/lib/log4j.jar
Code: Select all
transform-pdf:
[fop] log4j:WARN No appenders could be found for logger (org.apache.xmlgraphics.image.loader.spi.ImageImplRegistry).
[fop] log4j:WARN Please initialize the log4j system properly.
Yet, I'm not sure if ${oxygenHome}/lib/log4j.jar is the recommended way of controlling logging in an Oxygen transformation scenario. If so, how should I configure log4j logging properly for ${oxygenHome}/lib/xmlgraphics-commons-2.1.jar (which is containing the org.apache.xmlgraphics.image.loader.spi.ImageImplRegistry class)?
Best,
Ron