From 6a7f5e815fe035bc389dc7a218381cdb52112dff Mon Sep 17 00:00:00 2001 From: Peter Bernard West Date: Sat, 6 Mar 2004 05:56:58 +0000 Subject: [PATCH] Adjusted for Configuration instance, and use of java.util.logging git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/FOP_0-20-0_Alt-Design@197415 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/fo/FOTree.java | 14 ++++++++++---- .../org/apache/fop/xml/FoXmlSerialHandler.java | 13 +++++++++---- 2 files changed, 19 insertions(+), 8 deletions(-) diff --git a/src/java/org/apache/fop/fo/FOTree.java b/src/java/org/apache/fop/fo/FOTree.java index e2a31ea1e..a0a7b25d4 100644 --- a/src/java/org/apache/fop/fo/FOTree.java +++ b/src/java/org/apache/fop/fo/FOTree.java @@ -18,8 +18,9 @@ */ package org.apache.fop.fo; -import org.apache.fop.apps.Driver; -import org.apache.fop.configuration.Configuration; +import java.util.logging.Level; + +import org.apache.fop.apps.Fop; import org.apache.fop.datastructs.Tree; import org.apache.fop.datatypes.Numeric; import org.apache.fop.datatypes.PropertyValue; @@ -63,7 +64,10 @@ public class FOTree extends Tree implements Runnable { throws PropertyException { super(); - errorDump = Configuration.getBooleanValue("debugMode").booleanValue(); + Level level = Fop.logger.getLevel(); + if (level.intValue() <= Level.FINE.intValue()) { + errorDump = true; + } this.xmlevents = xmlevents; exprParser = new PropertyParser(this); @@ -127,7 +131,9 @@ public class FOTree extends Tree implements Runnable { // Get the end of document xmlevents.getEndDocument(); } catch (Exception e) { - if (errorDump) Driver.dumpError(e); + if (errorDump) { + e.printStackTrace(); + } if (parserThread != null) { try { parserThread.interrupt(); diff --git a/src/java/org/apache/fop/xml/FoXmlSerialHandler.java b/src/java/org/apache/fop/xml/FoXmlSerialHandler.java index 36629283f..33fa6b916 100644 --- a/src/java/org/apache/fop/xml/FoXmlSerialHandler.java +++ b/src/java/org/apache/fop/xml/FoXmlSerialHandler.java @@ -20,6 +20,7 @@ package org.apache.fop.xml; import java.util.NoSuchElementException; +import java.util.logging.Level; import org.xml.sax.Attributes; import org.xml.sax.InputSource; @@ -27,9 +28,8 @@ import org.xml.sax.XMLReader; import org.xml.sax.helpers.AttributesImpl; import org.xml.sax.helpers.DefaultHandler; -import org.apache.fop.apps.Driver; import org.apache.fop.apps.FOPException; -import org.apache.fop.configuration.Configuration; +import org.apache.fop.apps.Fop; import org.apache.fop.fo.FObjectNames; import org.apache.fop.xml.Namespaces; @@ -68,7 +68,10 @@ implements Runnable { this.source = source; namespaces = events.getNamespaces(); parser.setContentHandler(this); - errorDump = Configuration.getBooleanValue("debugMode").booleanValue(); + Level level = Fop.logger.getLevel(); + if (level.intValue() <= Level.FINE.intValue()) { + errorDump = true; + } } public void setFoThread(Thread foThread) { @@ -83,7 +86,9 @@ implements Runnable { try { parser.parse(source); } catch (Exception e) { - if (errorDump) Driver.dumpError(e); + if (errorDump) { + e.printStackTrace(); + } if (foThread != null) { try { foThread.interrupt(); -- 2.39.5