aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKeiron Liddle <keiron@apache.org>2001-09-11 10:04:25 +0000
committerKeiron Liddle <keiron@apache.org>2001-09-11 10:04:25 +0000
commit8bb6c2d578d4a4ba27cc2deae5631818bd5de5bb (patch)
treead73326f205d3602761fc457eef2096e3bfd352d
parent79db8c24be62a9621234f9b882e5cce0c3def26c (diff)
downloadxmlgraphics-fop-8bb6c2d578d4a4ba27cc2deae5631818bd5de5bb.tar.gz
xmlgraphics-fop-8bb6c2d578d4a4ba27cc2deae5631818bd5de5bb.zip
improved debugging messages a bit
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194459 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/org/apache/fop/apps/Fop.java4
-rw-r--r--src/org/apache/fop/apps/StreamRenderer.java16
-rw-r--r--src/org/apache/fop/datatypes/ColorType.java8
-rw-r--r--src/org/apache/fop/datatypes/Length.java2
-rw-r--r--src/org/apache/fop/datatypes/LengthRange.java6
-rw-r--r--src/org/apache/fop/fo/EnumProperty.java2
-rw-r--r--src/org/apache/fop/fo/FOText.java2
-rw-r--r--src/org/apache/fop/fo/Property.java2
-rw-r--r--src/org/apache/fop/fo/PropertyListBuilder.java14
-rw-r--r--src/org/apache/fop/fo/flow/Character.java2
-rw-r--r--src/org/apache/fop/fo/flow/Flow.java2
-rw-r--r--src/org/apache/fop/fo/flow/Footnote.java2
-rw-r--r--src/org/apache/fop/fo/flow/Leader.java2
-rw-r--r--src/org/apache/fop/fo/flow/PageNumber.java2
-rw-r--r--src/org/apache/fop/fo/flow/PageNumberCitation.java2
-rw-r--r--src/org/apache/fop/fo/flow/Table.java8
-rw-r--r--src/org/apache/fop/fo/pagination/ConditionalPageMasterReference.java2
-rw-r--r--src/org/apache/fop/fo/pagination/PageMasterReference.java2
-rw-r--r--src/org/apache/fop/fo/pagination/PageSequence.java10
-rw-r--r--src/org/apache/fop/fo/pagination/PageSequenceMaster.java2
-rw-r--r--src/org/apache/fop/fo/pagination/SimplePageMaster.java4
-rw-r--r--src/org/apache/fop/image/SVGImage.java2
-rw-r--r--src/org/apache/fop/image/analyser/SVGReader.java2
-rw-r--r--src/org/apache/fop/layout/FontInfo.java4
-rwxr-xr-xsrc/org/apache/fop/render/pcl/PCLRenderer.java8
-rw-r--r--src/org/apache/fop/tools/TestConverter.java14
26 files changed, 69 insertions, 57 deletions
diff --git a/src/org/apache/fop/apps/Fop.java b/src/org/apache/fop/apps/Fop.java
index b4ae7d708..8cd8d71e7 100644
--- a/src/org/apache/fop/apps/Fop.java
+++ b/src/org/apache/fop/apps/Fop.java
@@ -18,12 +18,12 @@ public class Fop {
Starter starter = options.getStarter();
starter.run();
} catch (FOPException e) {
- MessageHandler.errorln("ERROR: " + e.getMessage());
+ MessageHandler.errorln("" + e.getMessage());
if (options != null && options.isDebugMode().booleanValue()) {
e.printStackTrace();
}
} catch (java.io.FileNotFoundException e) {
- MessageHandler.errorln("ERROR: " + e.getMessage());
+ MessageHandler.errorln("" + e.getMessage());
if (options != null && options.isDebugMode().booleanValue()) {
e.printStackTrace();
}
diff --git a/src/org/apache/fop/apps/StreamRenderer.java b/src/org/apache/fop/apps/StreamRenderer.java
index 1c22a2e45..cb3da8744 100644
--- a/src/org/apache/fop/apps/StreamRenderer.java
+++ b/src/org/apache/fop/apps/StreamRenderer.java
@@ -146,20 +146,20 @@ public class StreamRenderer {
long memoryNow = runtime.totalMemory() - runtime.freeMemory();
long memoryUsed = (memoryNow - initialMemory) / 1024L;
- log.info("Initial heap size: " + (initialMemory/1024L) + "Kb");
- log.info("Current heap size: " + (memoryNow/1024L) + "Kb");
- log.info("Total memory used: " + memoryUsed + "Kb");
+ log.debug("Initial heap size: " + (initialMemory/1024L) + "Kb");
+ log.debug("Current heap size: " + (memoryNow/1024L) + "Kb");
+ log.debug("Total memory used: " + memoryUsed + "Kb");
if (!MEM_PROFILE_WITH_GC) {
- log.info(" Memory use is indicative; no GC was performed");
- log.info(" These figures should not be used comparatively");
+ log.debug(" Memory use is indicative; no GC was performed");
+ log.debug(" These figures should not be used comparatively");
}
long timeUsed = System.currentTimeMillis() - startTime;
- log.info("Total time used: " + timeUsed + "ms");
- log.info("Pages rendererd: " + pageCount);
- log.info("Avg render time: " + (timeUsed / pageCount) + "ms/page");
+ log.debug("Total time used: " + timeUsed + "ms");
+ log.debug("Pages rendererd: " + pageCount);
+ log.debug("Avg render time: " + (timeUsed / pageCount) + "ms/page");
}
/**
diff --git a/src/org/apache/fop/datatypes/ColorType.java b/src/org/apache/fop/datatypes/ColorType.java
index 3964343c3..fcbe4f49d 100644
--- a/src/org/apache/fop/datatypes/ColorType.java
+++ b/src/org/apache/fop/datatypes/ColorType.java
@@ -68,13 +68,13 @@ public class ColorType {
this.red = 0;
this.green = 0;
this.blue = 0;
- MessageHandler.errorln("ERROR: unknown colour format. Must be #RGB or #RRGGBB");
+ MessageHandler.errorln("unknown colour format. Must be #RGB or #RRGGBB");
}
} catch (Exception e) {
this.red = 0;
this.green = 0;
this.blue = 0;
- MessageHandler.errorln("ERROR: unknown colour format. Must be #RGB or #RRGGBB");
+ MessageHandler.errorln("unknown colour format. Must be #RGB or #RRGGBB");
}
} else if (value.startsWith("rgb(")) {
int poss = value.indexOf("(");
@@ -117,7 +117,7 @@ public class ColorType {
this.red = 0;
this.green = 0;
this.blue = 0;
- MessageHandler.errorln("ERROR: unknown colour format. Must be #RGB or #RRGGBB");
+ MessageHandler.errorln("unknown colour format. Must be #RGB or #RRGGBB");
}
}
} else if (value.startsWith("url(")) {
@@ -143,7 +143,7 @@ public class ColorType {
this.red = 0;
this.green = 0;
this.blue = 0;
- MessageHandler.errorln("ERROR: unknown colour name: "
+ MessageHandler.errorln("unknown colour name: "
+ value);
}
}
diff --git a/src/org/apache/fop/datatypes/Length.java b/src/org/apache/fop/datatypes/Length.java
index 0dad1fd77..334ec9153 100644
--- a/src/org/apache/fop/datatypes/Length.java
+++ b/src/org/apache/fop/datatypes/Length.java
@@ -74,7 +74,7 @@ public class Length {
dvalue = dvalue * assumed_resolution;
else {
dvalue = 0;
- MessageHandler.errorln("ERROR: unknown length unit '" + unit
+ MessageHandler.errorln("unknown length unit '" + unit
+ "'");
}
this.millipoints = (int)(dvalue * 1000);
diff --git a/src/org/apache/fop/datatypes/LengthRange.java b/src/org/apache/fop/datatypes/LengthRange.java
index 007323299..a15002423 100644
--- a/src/org/apache/fop/datatypes/LengthRange.java
+++ b/src/org/apache/fop/datatypes/LengthRange.java
@@ -101,7 +101,7 @@ public class LengthRange implements CompoundDatatype {
* // if minimum is explicit, force max to min
* if ((bfSet&MAXSET)!=0) {
* // Warning: min>max, resetting max to min
- * MessageHandler.errorln("WARNING: forcing max to min in LengthRange");
+ * MessageHandler.errorln("forcing max to min in LengthRange");
* }
* maximum = minimum ;
* }
@@ -114,7 +114,7 @@ public class LengthRange implements CompoundDatatype {
* if ((bfSet&OPTSET)!=0) {
* if ((bfSet&MAXSET)!=0) {
* // Warning: opt > max, resetting opt to max
- * MessageHandler.errorln("WARNING: forcing opt to max in LengthRange");
+ * MessageHandler.errorln("forcing opt to max in LengthRange");
* optimum = maximum ;
* }
* else {
@@ -130,7 +130,7 @@ public class LengthRange implements CompoundDatatype {
* if ((bfSet&MINSET)!=0) {
* // if minimum is explicit, force opt to min
* if ((bfSet&OPTSET)!=0) {
- * MessageHandler.errorln("WARNING: forcing opt to min in LengthRange");
+ * MessageHandler.errorln("forcing opt to min in LengthRange");
* }
* optimum = minimum ;
* }
diff --git a/src/org/apache/fop/fo/EnumProperty.java b/src/org/apache/fop/fo/EnumProperty.java
index a5804420e..1227aad5e 100644
--- a/src/org/apache/fop/fo/EnumProperty.java
+++ b/src/org/apache/fop/fo/EnumProperty.java
@@ -23,7 +23,7 @@ public class EnumProperty extends Property {
* Called by subclass if no match found.
*/
public Property checkEnumValues(String value) {
- MessageHandler.errorln("WARNING: Unknown enumerated value for property '"
+ MessageHandler.errorln("Unknown enumerated value for property '"
+ getPropName() + "': " + value);
return null;
}
diff --git a/src/org/apache/fop/fo/FOText.java b/src/org/apache/fop/fo/FOText.java
index d289a549e..bc86aba20 100644
--- a/src/org/apache/fop/fo/FOText.java
+++ b/src/org/apache/fop/fo/FOText.java
@@ -105,7 +105,7 @@ public class FOText extends FONode {
// ML - remove refs to BufferManager
// char ca[] = this.bufferManager.readBuffer((Object)this);
if (!(area instanceof BlockArea)) {
- log.error("WARNING: text outside block area"
+ log.error("text outside block area"
+ new String(ca, start, length));
return new Status(Status.OK);
}
diff --git a/src/org/apache/fop/fo/Property.java b/src/org/apache/fop/fo/Property.java
index aa623395e..102ab7636 100644
--- a/src/org/apache/fop/fo/Property.java
+++ b/src/org/apache/fop/fo/Property.java
@@ -132,7 +132,7 @@ public class Property {
return setSubprop(baseProp, partName, p);
}
} else {
- //MessageHandler.errorln("WARNING: compound property component "
+ //MessageHandler.errorln("compound property component "
// + partName + " unknown.");
}
return baseProp;
diff --git a/src/org/apache/fop/fo/PropertyListBuilder.java b/src/org/apache/fop/fo/PropertyListBuilder.java
index 3cd2c6c1a..f2bf0522c 100644
--- a/src/org/apache/fop/fo/PropertyListBuilder.java
+++ b/src/org/apache/fop/fo/PropertyListBuilder.java
@@ -51,13 +51,13 @@ public class PropertyListBuilder {
try {
p = propertyMaker.compute(propertyList);
} catch (FOPException e) {
- MessageHandler.errorln("ERROR: exception occurred while computing"
+ MessageHandler.errorln("exception occurred while computing"
+ " value of property '"
+ propertyName + "': "
+ e.getMessage());
}
} else {
- MessageHandler.errorln("WARNING: property " + propertyName
+ MessageHandler.errorln("property " + propertyName
+ " ignored");
}
return p;
@@ -72,7 +72,7 @@ public class PropertyListBuilder {
if (propertyMaker != null) {
b = propertyMaker.isInherited();
} else {
- // MessageHandler.errorln("WARNING: Unknown property " + propertyName);
+ // MessageHandler.errorln("Unknown property " + propertyName);
b = true;
}
return b;
@@ -171,7 +171,7 @@ public class PropertyListBuilder {
}
} else {
if (!attributeName.startsWith("xmlns"))
- MessageHandler.errorln("WARNING: property '"
+ MessageHandler.errorln("property '"
+ attributeName + "' ignored");
}
}
@@ -198,7 +198,7 @@ public class PropertyListBuilder {
if (propertyMaker != null) {
return propertyMaker.isCorrespondingForced(propertyList);
} else {
- MessageHandler.errorln("WARNING: no Maker for " + propertyName);
+ MessageHandler.errorln("no Maker for " + propertyName);
}
return false;
}
@@ -210,7 +210,7 @@ public class PropertyListBuilder {
if (propertyMaker != null) {
return propertyMaker.getShorthand(propertyList);
} else {
- MessageHandler.errorln("WARNING: no Maker for " + propertyName);
+ MessageHandler.errorln("no Maker for " + propertyName);
return null;
}
}
@@ -227,7 +227,7 @@ public class PropertyListBuilder {
if (propertyMaker != null) {
p = propertyMaker.make(propertyList);
} else {
- MessageHandler.errorln("WARNING: property " + propertyName
+ MessageHandler.errorln("property " + propertyName
+ " ignored");
}
return p;
diff --git a/src/org/apache/fop/fo/flow/Character.java b/src/org/apache/fop/fo/flow/Character.java
index 79727d441..ac8b870ab 100644
--- a/src/org/apache/fop/fo/flow/Character.java
+++ b/src/org/apache/fop/fo/flow/Character.java
@@ -59,7 +59,7 @@ public class Character extends FObj {
public Status layout(Area area) throws FOPException {
BlockArea blockArea;
if (!(area instanceof BlockArea)) {
- log.error("WARNING: currently Character can only be in a BlockArea");
+ log.warn("currently Character can only be in a BlockArea");
return new Status(Status.OK);
}
blockArea = (BlockArea)area;
diff --git a/src/org/apache/fop/fo/flow/Flow.java b/src/org/apache/fop/fo/flow/Flow.java
index cf08e9a1e..e2819fb14 100644
--- a/src/org/apache/fop/fo/flow/Flow.java
+++ b/src/org/apache/fop/fo/flow/Flow.java
@@ -90,7 +90,7 @@ public class Flow extends FObj {
protected void setFlowName(String name) throws FOPException {
if (name == null || name.equals("")) {
- log.error("WARNING: A 'flow-name' is required for "
+ log.warn("A 'flow-name' is required for "
+ getElementName()
+ ". This constraint will be enforced in future versions of FOP");
_flowName = "xsl-region-body";
diff --git a/src/org/apache/fop/fo/flow/Footnote.java b/src/org/apache/fop/fo/flow/Footnote.java
index d4a239f49..3348b730d 100644
--- a/src/org/apache/fop/fo/flow/Footnote.java
+++ b/src/org/apache/fop/fo/flow/Footnote.java
@@ -65,7 +65,7 @@ public class Footnote extends FObj {
}
}
if (fbody == null) {
- log.error("WARNING: no footnote-body in footnote");
+ log.error("no footnote-body in footnote");
}
if (area instanceof BlockArea) {}
return new Status(Status.OK);
diff --git a/src/org/apache/fop/fo/flow/Leader.java b/src/org/apache/fop/fo/flow/Leader.java
index ee95497b1..79fc55136 100644
--- a/src/org/apache/fop/fo/flow/Leader.java
+++ b/src/org/apache/fop/fo/flow/Leader.java
@@ -47,7 +47,7 @@ public class Leader extends FObjMixed {
BlockArea blockArea;
// restriction in this version
if (!(area instanceof BlockArea)) {
- log.error("WARNING: in this version of Fop fo:leader must be a direct child of fo:block ");
+ log.warn("in this version of Fop fo:leader must be a direct child of fo:block ");
return new Status(Status.OK);
} else {
blockArea = (BlockArea)area;
diff --git a/src/org/apache/fop/fo/flow/PageNumber.java b/src/org/apache/fop/fo/flow/PageNumber.java
index 65925e54e..81b807a15 100644
--- a/src/org/apache/fop/fo/flow/PageNumber.java
+++ b/src/org/apache/fop/fo/flow/PageNumber.java
@@ -46,7 +46,7 @@ public class PageNumber extends FObj {
public Status layout(Area area) throws FOPException {
if (!(area instanceof BlockArea)) {
- log.error("WARNING: page-number outside block area");
+ log.warn("page-number outside block area");
return new Status(Status.OK);
}
if (this.marker == START) {
diff --git a/src/org/apache/fop/fo/flow/PageNumberCitation.java b/src/org/apache/fop/fo/flow/PageNumberCitation.java
index 034be267e..447149cce 100644
--- a/src/org/apache/fop/fo/flow/PageNumberCitation.java
+++ b/src/org/apache/fop/fo/flow/PageNumberCitation.java
@@ -104,7 +104,7 @@ public class PageNumberCitation extends FObj {
public Status layout(Area area) throws FOPException {
if (!(area instanceof BlockArea)) {
- log.error("WARNING: page-number-citation outside block area");
+ log.warn("page-number-citation outside block area");
return new Status(Status.OK);
}
diff --git a/src/org/apache/fop/fo/flow/Table.java b/src/org/apache/fop/fo/flow/Table.java
index b6c828b2c..7ab0f488f 100644
--- a/src/org/apache/fop/fo/flow/Table.java
+++ b/src/org/apache/fop/fo/flow/Table.java
@@ -198,21 +198,21 @@ public class Table extends FObj {
FONode fo = (FONode)children.elementAt(i);
if (fo instanceof TableHeader) {
if (columns.size() == 0) {
- log.error("WARNING: current implementation of tables requires a table-column for each column, indicating column-width");
+ log.warn("current implementation of tables requires a table-column for each column, indicating column-width");
return new Status(Status.OK);
}
tableHeader = (TableHeader)fo;
tableHeader.setColumns(columns);
} else if (fo instanceof TableFooter) {
if (columns.size() == 0) {
- log.error("WARNING: current implementation of tables requires a table-column for each column, indicating column-width");
+ log.warn("current implementation of tables requires a table-column for each column, indicating column-width");
return new Status(Status.OK);
}
tableFooter = (TableFooter)fo;
tableFooter.setColumns(columns);
} else if (fo instanceof TableBody) {
if (columns.size() == 0) {
- log.error("WARNING: current implementation of tables requires a table-column for each column, indicating column-width");
+ log.warn("current implementation of tables requires a table-column for each column, indicating column-width");
return new Status(Status.OK);
}
Status status;
@@ -290,7 +290,7 @@ public class Table extends FObj {
// from the last table body and place it on the
// next page so that it can have a footer at
// the end of the table.
- log.error("WARNING: footer could not fit on page, moving last body row to next page");
+ log.warn("footer could not fit on page, moving last body row to next page");
area.addChild(areaContainer);
area.increaseHeight(areaContainer.getHeight());
area.setAbsoluteHeight(areaContainer.getAbsoluteHeight());
diff --git a/src/org/apache/fop/fo/pagination/ConditionalPageMasterReference.java b/src/org/apache/fop/fo/pagination/ConditionalPageMasterReference.java
index c87dd5082..2e3a81431 100644
--- a/src/org/apache/fop/fo/pagination/ConditionalPageMasterReference.java
+++ b/src/org/apache/fop/fo/pagination/ConditionalPageMasterReference.java
@@ -147,7 +147,7 @@ public class ConditionalPageMasterReference extends FObj {
(RepeatablePageMasterAlternatives)parent;
if (getMasterName() == null) {
- log.error("WARNING: single-page-master-reference"
+ log.warn("single-page-master-reference"
+ "does not have a master-name and so is being ignored");
} else {
this.repeatablePageMasterAlternatives.addConditionalPageMasterReference(this);
diff --git a/src/org/apache/fop/fo/pagination/PageMasterReference.java b/src/org/apache/fop/fo/pagination/PageMasterReference.java
index 33e31419a..05300a065 100644
--- a/src/org/apache/fop/fo/pagination/PageMasterReference.java
+++ b/src/org/apache/fop/fo/pagination/PageMasterReference.java
@@ -71,7 +71,7 @@ public abstract class PageMasterReference extends FObj
_pageSequenceMaster = (PageSequenceMaster)parent;
if (getMasterName() == null) {
- log.error("WARNING: " + getElementName()
+ log.warn("" + getElementName()
+ " does not have a master-name and so is being ignored");
} else {
_pageSequenceMaster.addSubsequenceSpecifier(this);
diff --git a/src/org/apache/fop/fo/pagination/PageSequence.java b/src/org/apache/fop/fo/pagination/PageSequence.java
index 801ce7a36..290f19454 100644
--- a/src/org/apache/fop/fo/pagination/PageSequence.java
+++ b/src/org/apache/fop/fo/pagination/PageSequence.java
@@ -199,7 +199,7 @@ public class PageSequence extends FObj {
throw new FOPException("flow-names must be unique within an fo:page-sequence");
}
if (!this.layoutMasterSet.regionNameExists(flow.getFlowName())) {
- log.error("WARNING: region-name '"
+ log.error("region-name '"
+ flow.getFlowName()
+ "' doesn't exist in the layout-master-set.");
}
@@ -272,7 +272,7 @@ public class PageSequence extends FObj {
currentPage.setFormattedNumber(formattedPageNumber);
this.root.setRunningPageNumberCounter(this.currentPageNumber);
- log.info(" [" + currentPageNumber);
+ log.info("[" + currentPageNumber + "]");
if ((status.getCode() == Status.FORCE_PAGE_BREAK_EVEN)
&& ((currentPageNumber % 2) == 1)) {}
@@ -301,7 +301,7 @@ public class PageSequence extends FObj {
currentPage.setPageSequence(this);
formatStaticContent(areaTree);
- log.info("]");
+ //log.info("]");
areaTree.addPage(currentPage);
this.pageCount++; // used for 'force-page-count' calculations
}
@@ -412,7 +412,7 @@ public class PageSequence extends FObj {
AreaContainer beforeArea = currentPage.getBefore();
((StaticContent)flow).layout(area, region);
} else {
- log.error("WARNING: " + region.getName()
+ log.error("" + region.getName()
+ " only supports static-content flows currently. Cannot use flow named '"
+ flow.getFlowName() + "'");
}
@@ -476,7 +476,7 @@ public class PageSequence extends FObj {
SubSequenceSpecifier nextSubsequence =
getNextSubsequence(sequenceMaster);
if (nextSubsequence == null) {
- log.error("\nWARNING: Page subsequences exhausted. Using previous subsequence.");
+ log.error("Page subsequences exhausted. Using previous subsequence.");
thisIsFirstPage =
true; // this becomes the first page in the new (old really) page master
currentSubsequence.reset();
diff --git a/src/org/apache/fop/fo/pagination/PageSequenceMaster.java b/src/org/apache/fop/fo/pagination/PageSequenceMaster.java
index d81af406a..018356f7a 100644
--- a/src/org/apache/fop/fo/pagination/PageSequenceMaster.java
+++ b/src/org/apache/fop/fo/pagination/PageSequenceMaster.java
@@ -51,7 +51,7 @@ public class PageSequenceMaster extends FObj {
this.layoutMasterSet = (LayoutMasterSet)parent;
String pm = this.properties.get("master-name").getString();
if (pm == null) {
- log.error("WARNING: page-sequence-master does not have "
+ log.warn("page-sequence-master does not have "
+ "a page-master-name and so is being ignored");
} else {
this.layoutMasterSet.addPageSequenceMaster(pm, this);
diff --git a/src/org/apache/fop/fo/pagination/SimplePageMaster.java b/src/org/apache/fop/fo/pagination/SimplePageMaster.java
index 58c912b93..92586593c 100644
--- a/src/org/apache/fop/fo/pagination/SimplePageMaster.java
+++ b/src/org/apache/fop/fo/pagination/SimplePageMaster.java
@@ -57,7 +57,7 @@ public class SimplePageMaster extends FObj {
this.layoutMasterSet = (LayoutMasterSet)parent;
masterName = this.properties.get("master-name").getString();
if (masterName == null) {
- log.error("WARNING: simple-page-master does not have "
+ log.warn("simple-page-master does not have "
+ "a master-name and so is being ignored");
} else {
this.layoutMasterSet.addSimplePageMaster(this);
@@ -98,7 +98,7 @@ public class SimplePageMaster extends FObj {
contentRectangleHeight);
this.pageMaster.addBody(body);
} else {
- log.error("ERROR: simple-page-master must have a region of class "
+ log.error("simple-page-master must have a region of class "
+ RegionBody.REGION_CLASS);
}
diff --git a/src/org/apache/fop/image/SVGImage.java b/src/org/apache/fop/image/SVGImage.java
index ecc08aa1a..34f4a625a 100644
--- a/src/org/apache/fop/image/SVGImage.java
+++ b/src/org/apache/fop/image/SVGImage.java
@@ -56,7 +56,7 @@ public class SVGImage extends AbstractFopImage {
new SAXSVGDocumentFactory(SVGImage.getParserName());
doc = factory.createDocument(this.m_href.toExternalForm());
} catch (Exception e) {
- MessageHandler.errorln("ERROR LOADING EXTERNAL SVG: "
+ MessageHandler.errorln("Could not load external SVG: "
+ e.getMessage());
}
}
diff --git a/src/org/apache/fop/image/analyser/SVGReader.java b/src/org/apache/fop/image/analyser/SVGReader.java
index eedf04014..d2f60a1af 100644
--- a/src/org/apache/fop/image/analyser/SVGReader.java
+++ b/src/org/apache/fop/image/analyser/SVGReader.java
@@ -56,7 +56,7 @@ public class SVGReader extends AbstractImageReader {
MessageHandler.errorln("Batik not in class path");
return false;
} catch (Exception e) {
- MessageHandler.errorln("ERROR LOADING EXTERNAL SVG: "
+ MessageHandler.errorln("Could not load external SVG: "
+ e.getMessage());
// assuming any exception means this document is not svg
// or could not be loaded for some reason
diff --git a/src/org/apache/fop/layout/FontInfo.java b/src/org/apache/fop/layout/FontInfo.java
index e54f76fcf..4e8258fb1 100644
--- a/src/org/apache/fop/layout/FontInfo.java
+++ b/src/org/apache/fop/layout/FontInfo.java
@@ -58,9 +58,9 @@ public class FontInfo {
if (f == null) {
throw new FOPException("no default font defined by OutputConverter");
}
- MessageHandler.errorln("WARNING: defaulted font to any,normal,normal");
+ MessageHandler.errorln("defaulted font to any,normal,normal");
}
- MessageHandler.errorln("WARNING: unknown font " + key
+ MessageHandler.errorln("unknown font " + key
+ " so defaulted font to any");
}
diff --git a/src/org/apache/fop/render/pcl/PCLRenderer.java b/src/org/apache/fop/render/pcl/PCLRenderer.java
index 687bc8c77..36dd0f703 100755
--- a/src/org/apache/fop/render/pcl/PCLRenderer.java
+++ b/src/org/apache/fop/render/pcl/PCLRenderer.java
@@ -218,7 +218,7 @@ public class PCLRenderer extends PrintRenderer {
int xpos = xoffset + (x / 100);
if (xpos < 0) {
xpos = 0;
- log.error("PCLRenderer.addRect() WARNING: Horizontal position out of bounds.");
+ log.warn("Horizontal position out of bounds.");
}
currentStream.add("\033*v1O\033&a" + xpos + "h"
@@ -229,7 +229,7 @@ public class PCLRenderer extends PrintRenderer {
xpos = xoffset + ((x + 240) / 100);
if (xpos < 0) {
xpos = 0;
- log.error("PCLRenderer.addRect() WARNING: Horizontal position out of bounds.");
+ log.warn("Horizontal position out of bounds.");
}
currentStream.add("\033&a" + xpos + "h"
+ (pageHeight - ((y + 240)) / 100) + "V"
@@ -372,7 +372,7 @@ public class PCLRenderer extends PrintRenderer {
int xpos = xoffset + (x / 100);
if (xpos < 0) {
xpos = 0;
- log.error("PCLRenderer.renderImageArea() WARNING: Horizontal position out of bounds.");
+ log.warn("Horizontal position out of bounds.");
}
currentStream.add("\033&a" + xpos + "h" + (pageHeight - (y / 100))
@@ -616,7 +616,7 @@ public class PCLRenderer extends PrintRenderer {
int xpos = xoffset + (rx / 100);
if (xpos < 0) {
xpos = 0;
- log.error("PCLRenderer.renderWordArea() WARNING: Horizontal position out of bounds.");
+ log.warn("Horizontal position out of bounds.");
}
currentStream.add("\033&a" + xpos + "h" + (pageHeight - (bl / 100))
+ "V" + s);
diff --git a/src/org/apache/fop/tools/TestConverter.java b/src/org/apache/fop/tools/TestConverter.java
index 4cc6dd17d..20be1ff9a 100644
--- a/src/org/apache/fop/tools/TestConverter.java
+++ b/src/org/apache/fop/tools/TestConverter.java
@@ -11,6 +11,9 @@ import org.apache.fop.apps.*;
import org.apache.fop.configuration.*;
import org.apache.log.*;
+import org.apache.log.format.*;
+import org.apache.log.output.io.*;
+import org.apache.log.output.*;
import java.io.*;
import java.util.*;
@@ -85,7 +88,16 @@ public class TestConverter {
}
private void setupLogging() {
- log = Hierarchy.getDefaultHierarchy().getLoggerFor("test");
+ 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("test");
+ log.setPriority(Priority.ERROR);
}
public void setOutputPDF(boolean pdf) {