cziegeler    2002/07/17 06:22:37

  Modified:    .        changes.xml
               src/java/org/apache/cocoon/serialization FOPSerializer.java
  Log:
  Direct fop log messages to log
  
  Revision  Changes    Path
  1.215     +9 -6      xml-cocoon2/changes.xml
  
  Index: changes.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/changes.xml,v
  retrieving revision 1.214
  retrieving revision 1.215
  diff -u -r1.214 -r1.215
  --- changes.xml       15 Jul 2002 10:22:56 -0000      1.214
  +++ changes.xml       17 Jul 2002 13:22:37 -0000      1.215
  @@ -119,10 +119,6 @@
      Changed the implementation of the source:write tag so it now buffers to DOM 
Fragment like source:insert.
      Added new tests, updated slash-edit to use new tags.   
     </action>
  -  <action dev="CZ" type="fix" fixes-bug="10254" due-to="Stuart Roebuck" 
due-to-email="[EMAIL PROTECTED] ">
  -   Applied patch for MaybeUploadRequestFactoryImpl which sets the timeout for a 
session to
  -   infinite during an upload and restores it afterwards.
  -  </action>
     <action dev="VG" type="remove">                               
      Removed (long time deprecated) matcher and selector factories. Use
      appropriate matchers and selectors instead.
  @@ -273,9 +269,16 @@
       for an easy upgrading. In addition the Excalibur XMLizer is added.
     </action>
     <action dev="CZ" type="add">
  -    Added the sunShine contribution from S&amp;N AG, Germany (http://s-und-n.de). 
This
  +    Added the sunShine contribution from S&amp;N AG, Germany 
(http://www.s-und-n.de). This
       contribution consists of a session management framework, an authentication
       framework and a portal engine.
  +  </action>
  +  <action dev="CZ" type="update">
  +    All log messages from FOP now go into the logs instead of printing them to the 
screen.
  +  </action>
  +  <action dev="CZ" type="fix" fixes-bug="10254" due-to="Stuart Roebuck" 
due-to-email="[EMAIL PROTECTED] ">
  +   Applied patch for MaybeUploadRequestFactoryImpl which sets the timeout for a 
session to
  +   infinite during an upload and restores it afterwards.
     </action>
    </release>
    <release version="2.0.3" date="July 15 2002">
  
  
  
  1.10      +18 -14    
xml-cocoon2/src/java/org/apache/cocoon/serialization/FOPSerializer.java
  
  Index: FOPSerializer.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/serialization/FOPSerializer.java,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- FOPSerializer.java        13 Jul 2002 17:17:50 -0000      1.9
  +++ FOPSerializer.java        17 Jul 2002 13:22:37 -0000      1.10
  @@ -63,6 +63,7 @@
   import org.apache.excalibur.source.impl.validity.NOPValidity;
   import org.apache.fop.apps.Driver;
   import org.apache.fop.apps.Options;
  +import org.apache.fop.messaging.MessageHandler;
   import org.apache.fop.render.Renderer;
   
   import java.io.OutputStream;
  @@ -110,11 +111,16 @@
        */
       protected boolean setContentLength = true;
   
  +    /** This logger is used for FOP */
  +    protected org.apache.avalon.framework.logger.Logger logger;
  +
       /**
         * Set the configurations for this serializer.
         */
       public void configure(Configuration conf)
  -        throws ConfigurationException {
  +    throws ConfigurationException {
  +        this.logger = new LogKitLogger(getLogger().getChildLogger("fop"));
  +        MessageHandler.setScreenLogger(this.logger);
           String userConfig = null;
           java.io.File userConfigFile = null;
   
  @@ -194,24 +200,22 @@
        */
       public void setOutputStream(OutputStream out) {
           // load the fop driver
  -        driver = new Driver();
  +        this.driver = new Driver();
   
  -        if(driver instanceof Loggable) {
  -            driver.setLogger(new LogKitLogger(getLogger().getChildLogger("fop")));
  -        }
  +        this.driver.setLogger(this.logger);
           if (this.rendererName == null) {
               this.renderer = factory.createRenderer(mimetype);
           } else {
               try {
  -                this.renderer = (Renderer)ClassUtils.newInstance(rendererName);
  +                this.renderer = (Renderer)ClassUtils.newInstance(this.rendererName);
               } catch (Exception ex) {
  -                getLogger().error("Cannot load  class " + rendererName, ex);
  -                throw new RuntimeException("Cannot load class " + rendererName);
  +                this.getLogger().error("Cannot load  class " + this.rendererName, 
ex);
  +                throw new RuntimeException("Cannot load class " + 
this.rendererName);
               }
           }
  -        driver.setRenderer(this.renderer);
  -        driver.setOutputStream(out);
  -        setContentHandler(driver.getContentHandler());
  +        this.driver.setRenderer(this.renderer);
  +        this.driver.setOutputStream(out);
  +        this.setContentHandler( this.driver.getContentHandler() );
       }
   
       /**
  @@ -243,8 +247,8 @@
         */
       public void recycle() {
           super.recycle();
  -        options = null;
  -        driver = null;
  +        this.options = null;
  +        this.driver = null;
           this.renderer = null;
       }
   
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to