You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-users@xmlgraphics.apache.org by Bernard Giannetti <th...@hotmail.com> on 2011/05/07 06:24:18 UTC

Missing render messages

Hi,

Having trouble capturing all logging from a FOP render.  I am using log4j and have configured it using the XML file (see the end of this post).  

Normally I find that all logging goes to my log file and console as per the logging level I set.

However I found by accident I had mistyped an attribute in an XSL file: instead of 

  <xsl:param name="page-height" value="" /> 

I had 

  <xsl:param n ame="page-height" value="" /> 

I noticed on the console after doing a render (in Eclipse) the following messages (the first two were in red):

[Fatal Error] pagesetup.xsl:6:16: Attribute name "n" associated with an element type "xsl:param" must be followed by the ' = ' character.
file:/home/bernard/reports/pagesetup.xsl; Line #6; Column #16; org.xml.sax.SAXParseException: Attribute name "n" associated with an element type "xsl:param" must be followed by the ' = ' character.
2011-05-07 14:11:08,228 [Thread-1] PrintToPDF - PrintToPDF$PrintToPDFUsingFOP.run(PrintToPDF.java:2025) - java.lang.NullPointerException

However in my log file only the third error (the exception) was present.  The first two lines were NOT in the log file.

My log4j configuration file is below.  I've tried specifying different classes to get different levels and to coax out the error message.  Even trying with all logging set to 'all' does not show the first two error messages.

Any ideas on how to capture all the information from the render?


<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd">

<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">

  <appender name="rollingFileAppender" class="org.apache.log4j.RollingFileAppender">
    <param name="File" value="log.txt"/>
    <param name="Append" value="true"/>
    <param name="MaxBackupIndex" value="0"/>
    <param name="MaxFileSize" value="500KB"/>
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d [%t] %c - %l - %m%n"/>
    </layout>
  </appender>

  <appender name="consoleAppender" class="org.apache.log4j.ConsoleAppender">
    <layout class="org.apache.log4j.PatternLayout">
      <param name="ConversionPattern" value="%d [%t] %c - %l - %m%n"/>
    </layout>
  </appender>

<!--
  <logger name="FOP">
    <level value="error"/> 
  </logger>

  <logger name="org.apache.fop">
    <level value="error"/> 
  </logger>

  <logger name="org.apache.fop.render">
    <level value="error"/> 
  </logger>

  <logger name="org.apache.xmlgraphics">
    <level value="error"/> 
  </logger>

  <logger name="org.xml.sax">
    <level value="error"/> 
  </logger>
-->

  <root>
    <priority value="all"/>
    <appender-ref ref="consoleAppender"/>
    <appender-ref ref="rollingFileAppender"/>
  </root>

</log4j:configuration>


Thanks in advance,

Bernard.