RE: How to remove log statements (Warning & Error messages).

Hi Seema,
Thanks for your response.
I was able to remove the log statements using the code for the latest
version of fop.
But we are using Fop-0.20.1. The Driver class doesn't have method
setLogger().
So anybody is having any idea then please help me.
Thanks & Regards,
Purvesh
-----Original Message-----
From: Seema Bhatnagar [mailto:seema.bhatnagar@systor.com]
Sent: Friday, June 28, 2002 9:33 PM
To: Purvesh Vora
Subject: Re: How to remove log statements (Warning & Error messages).



try this code ......


     Logger log_;
     Hierarchy hierarchy = Hierarchy.getDefaultHierarchy();
     PatternFormatter formatter = new PatternFormatter(
                    "[%{priority}]: %{message}\n%{throwable}" );
     LogTarget target = null;
     target = new StreamTarget(System.out, formatter);
     hierarchy.setDefaultLogTarget(target);
     log_ = hierarchy.getLoggerFor("");
     log_.setPriority(org.apache.log.Priority.ERROR);
     Logger logger = log_.getChildLogger("fop");
     driver.setLogger(logger);



                    "Purvesh Vora"
                   <purvesh.vora@p       To:  <www-xsl-fo@w3.org>
                         atni.com>       cc:
                   Sent by:              Subject:  How to remove log
statements (Warning & Error messages).
                   www-xsl-fo-requ
                   est@w3.org



                        27.06.2002
                             10:09




Hi Friends,
I am using apache fop to generate pdf through web.

Foll. is the method used for rendering pdf.
           /**
            * renders an FO inputsource into a PDF file which is rendered
            * to File.
            */
           public void renderFO(InputSource foFile,

FileOutputStream out)
throws Exception {
                     try {


                               Driver driver = new Driver(foFile, out);
                               driver.setRenderer(Driver.RENDER_PDF);
                               driver.run();

                     } catch (Exception ex) {
                               throw ex;//new ServletException(ex);
                     }

           }

In the log file I am getting so many warning and error messages. Can you
please guide me how to remove these unwanted warning and error statements.

Thanks & Regards
Purvesh Vora

(See attached file: winmail.dat)

Received on Monday, 1 July 2002 07:53:21 UTC