[xep-support] Trace output during rendering

Smolders, Eric Eric.Smolders at atosorigin.com
Tue Apr 2 22:57:53 PST 2002


Hi David,

I have read paragraph #4 several times but I don't understand how to attach
the custom document handler to the logger.
This is what I have tried:

  class cusHandler implements org.xml.sax.DocumentHandler
  {
    public synchronized void startDocument() throws org.xml.sax.SAXException
    {
    }

    public synchronized void endDocument() throws org.xml.sax.SAXException
    {
    }

    public synchronized void startElement(java.lang.String name,
                                          org.xml.sax.AttributeList atts)
throws org.xml.sax.SAXException
    {
    }
    
    public synchronized void endElement(java.lang.String name) throws
org.xml.sax.SAXException
    {
    }

    public synchronized void characters(char[] buffer, int start, int
length) throws org.xml.sax.SAXException
    {
    }

    public synchronized void ignorableWhitespace(char[] buffer, int start,
int length) throws org.xml.sax.SAXException
    {
    }

    public synchronized void processingInstruction(java.lang.String s1,
                                                   java.lang.String s2)
throws org.xml.sax.SAXException
    {
    }

    public synchronized void setDocumentLocator(org.xml.sax.Locator locator)

    {
    }
  }

Then I try to attach the custom handler to the logger in this way:

          cusHandler handler = new cusHandler();
 
com.renderx.FO2PDF.L.EventLogger.logger().setDocumentHandler(handler);

These calls are done after XEP is initialized.

After I have implemented this code, the same logging still occurs in the
output file.

Another question: when will the deprecated class DocumentHandler be replace
by the new class ContentHandler or when will deprecated Classes and methods
be replaced by the new ones in XEP?

Regards,

Eric Smolders
-----Original Message-----
From: David Tolpin [mailto:dvd at renderx.com]
Sent: dinsdag 2 april 2002 18:22
To: xep-support at renderx.com
Subject: Re: [xep-support] Trace output during rendering


> 
> Hi,
> 
> I have embedded XEP into our program. When the rendering takes place, a
lot
> of output is generated. This output is stored in our log file of our
system.
> Because of this the log file will grow and in the end the system will
crash.
> 
> Is it possible to let XEP not generate the trace??
> 

Yes.

The logging facility is fully configurable, and you can pass a dummy
logger to the engine. Details are in applications.pdf, "Using XEP 2.7 in
Java Applications", paragraph #4, "Logging Facility".

David Tolpin
RenderX
-------------------
By using the Service, you expressly agree to these Terms of Service
http://www.renderx.com/tos.html
-------------------
By using the Service, you expressly agree to these Terms of Service http://www.renderx.com/tos.html



More information about the Xep-support mailing list