From d04908a05ef64a2850289f6817125bd8a02c9088 Mon Sep 17 00:00:00 2001 From: Simon Pepping Date: Fri, 9 Jul 2004 17:27:12 +0000 Subject: Implementing user configuration file. Adding debug logging for user configuration, user PDF filters and user fonts. Adding reporting of mime type to renderers. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197774 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/pdf/PDFFilterList.java | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'src/java/org/apache/fop/pdf') diff --git a/src/java/org/apache/fop/pdf/PDFFilterList.java b/src/java/org/apache/fop/pdf/PDFFilterList.java index 946e10dc7..499bafc06 100644 --- a/src/java/org/apache/fop/pdf/PDFFilterList.java +++ b/src/java/org/apache/fop/pdf/PDFFilterList.java @@ -23,6 +23,11 @@ import java.io.OutputStream; import java.util.List; import java.util.Map; +// commons logging +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; + +// Avalon import org.apache.avalon.framework.configuration.Configuration; import org.apache.avalon.framework.configuration.ConfigurationException; @@ -47,6 +52,11 @@ public class PDFFilterList { private boolean ignoreASCIIFilters = false; + /** + * logging instance + */ + protected static Log logger = LogFactory.getLog("org.apache.fop.render"); + /** * Default constructor. *

@@ -276,6 +286,22 @@ public class PDFFilterList { if (type == null) { type = PDFFilterList.DEFAULT_FILTER; } + + if (!filterList.isEmpty() && logger.isDebugEnabled()) { + StringBuffer debug = new StringBuffer("Adding PDF filter"); + if (filterList.size() != 1) { + debug.append("s"); + } + debug.append(" for type ").append(type).append(": "); + for (int j = 0; j < filterList.size(); j++) { + if (j != 0) { + debug.append(", "); + } + debug.append(filterList.get(j)); + } + logger.debug(debug.toString()); + } + if (filterMap.get(type) != null) { throw new ConfigurationException("A filterList of type '" + type + "' has already been defined"); -- cgit v1.2.3