From: Christian Geisert Date: Mon, 9 Dec 2002 00:53:36 +0000 (+0000) Subject: Fixed spurious (nuisance) errors on print/awt renderers X-Git-Tag: fop-0_20_5rc~12 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=c9a8ed60894aeab63984fcef08bb27e0991e26e9;p=xmlgraphics-fop.git Fixed spurious (nuisance) errors on print/awt renderers Submitted by: Ralph LaChance (Ralph_LaChance@compuserve.com) git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/fop-0_20_2-maintain@195742 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/org/apache/fop/apps/AWTStarter.java b/src/org/apache/fop/apps/AWTStarter.java index 9ee4f91e2..2aec3acfd 100644 --- a/src/org/apache/fop/apps/AWTStarter.java +++ b/src/org/apache/fop/apps/AWTStarter.java @@ -28,7 +28,9 @@ import org.xml.sax.InputSource; import org.xml.sax.SAXException; import org.xml.sax.SAXParseException; - +// Avalon +import org.apache.avalon.framework.logger.ConsoleLogger; +import org.apache.avalon.framework.logger.Logger; // Java import java.io.FileReader; @@ -93,7 +95,7 @@ public class AWTStarter extends CommandLineStarter { renderer.setProgressListener(frame); renderer.setComponent(frame); driver = new Driver(); - driver.setLogger(log); + driver.setLogger(new ConsoleLogger(ConsoleLogger.LEVEL_INFO)); if (errorDump) { driver.setErrorDump(true); } diff --git a/src/org/apache/fop/apps/PrintStarter.java b/src/org/apache/fop/apps/PrintStarter.java index 6f8820e66..2d3750069 100644 --- a/src/org/apache/fop/apps/PrintStarter.java +++ b/src/org/apache/fop/apps/PrintStarter.java @@ -35,6 +35,9 @@ import org.apache.fop.layout.AreaTree; import org.apache.fop.layout.Page; import org.apache.fop.messaging.MessageHandler; +// Avalon +import org.apache.avalon.framework.logger.ConsoleLogger; +import org.apache.avalon.framework.logger.Logger; /** * This class prints a xsl-fo dokument without interaction. @@ -59,8 +62,10 @@ public class PrintStarter extends CommandLineStarter { driver.setErrorDump(true); } - String version = Version.getVersion(); - MessageHandler.errorln(version); + // Nov 18, 02 eliminates spurious [ERROR] message to logger + + driver.setLogger (new ConsoleLogger(ConsoleLogger.LEVEL_INFO)) ; + log.info (Version.getVersion()) ; XMLReader parser = inputHandler.getParser(); diff --git a/src/org/apache/fop/messaging/MessageHandler.java b/src/org/apache/fop/messaging/MessageHandler.java index 68ec86892..6d0e3c35a 100644 --- a/src/org/apache/fop/messaging/MessageHandler.java +++ b/src/org/apache/fop/messaging/MessageHandler.java @@ -93,7 +93,7 @@ public class MessageHandler { if (logger == null) { logger = new ConsoleLogger(ConsoleLogger.LEVEL_INFO); - logger.warn("Screen logger not set."); + logger.warn("Screen logger not set - Using ConsoleLogger."); } setMessage(message); @@ -142,7 +142,7 @@ public class MessageHandler { public static void error(String errorMessage) { if (logger == null) { logger = new ConsoleLogger(ConsoleLogger.LEVEL_INFO); - logger.warn("Screen logger not set."); + logger.warn("Screen logger not set - Using ConsoleLogger."); } setMessage(errorMessage);