aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/fo/FOTreeBuilder.java
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2002-08-07 16:54:58 +0000
committerJeremias Maerki <jeremias@apache.org>2002-08-07 16:54:58 +0000
commit1d750a74610958cfd33b5affcd1564cbb4626ae9 (patch)
tree93d6a1f480681c6fdae8ab081c44351d7e463683 /src/org/apache/fop/fo/FOTreeBuilder.java
parente3b6e3da3b59435c6190cdec99ec1b3547186533 (diff)
downloadxmlgraphics-fop-1d750a74610958cfd33b5affcd1564cbb4626ae9.tar.gz
xmlgraphics-fop-1d750a74610958cfd33b5affcd1564cbb4626ae9.zip
First batch of changes for preparation for adoption of Avalon patterns. Only changes on logging for now. Mostly usage of LogEnabled contract interface. Separate mail follows.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@195068 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop/fo/FOTreeBuilder.java')
-rw-r--r--src/org/apache/fop/fo/FOTreeBuilder.java14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/org/apache/fop/fo/FOTreeBuilder.java b/src/org/apache/fop/fo/FOTreeBuilder.java
index cb8e3ecca..7a7c259fe 100644
--- a/src/org/apache/fop/fo/FOTreeBuilder.java
+++ b/src/org/apache/fop/fo/FOTreeBuilder.java
@@ -30,7 +30,7 @@ import java.io.IOException;
/**
* SAX Handler that builds the formatting object tree.
- *
+ *
* Modified by Mark Lillywhite mark-fop@inomial.com. Now uses
* StreamRenderer to automagically render the document as
* soon as it receives a page-sequence end-tag. Also,
@@ -70,13 +70,12 @@ public class FOTreeBuilder extends DefaultHandler {
* (mark-fop@inomial.com)
*/
private StructureHandler structHandler;
- private Logger log;
private FOUserAgent userAgent;
public FOTreeBuilder() {}
- public void setLogger(Logger logger) {
- log = logger;
+ public Logger getLogger() {
+ return userAgent.getLogger();
}
public void setUserAgent(FOUserAgent ua) {
@@ -129,13 +128,13 @@ public class FOTreeBuilder extends DefaultHandler {
public void startDocument()
throws SAXException {
rootFObj = null; // allows FOTreeBuilder to be reused
- log.info("building formatting object tree");
+ getLogger().info("building formatting object tree");
structHandler.startDocument();
}
public void endDocument()
throws SAXException {
- log.info("Parsing of document complete, stopping renderer");
+ getLogger().info("Parsing of document complete, stopping renderer");
structHandler.endDocument();
}
@@ -164,7 +163,7 @@ public class FOTreeBuilder extends DefaultHandler {
String fullName = uri + "^" + localName;
if (!this.unknownFOs.containsKey(fullName)) {
this.unknownFOs.put(fullName, "");
- log.warn("Unknown formatting object "
+ getLogger().warn("Unknown formatting object "
+ fullName);
}
if(namespaces.contains(uri.intern())) {
@@ -179,7 +178,6 @@ public class FOTreeBuilder extends DefaultHandler {
try {
fobj = fobjMaker.make(currentFObj);
fobj.setName(localName);
- fobj.setLogger(log);
// set the user agent for resolving user agent values
fobj.setUserAgent(userAgent);
// set the stream renderer so that appropriate