aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/pdf/PDFDocument.java
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2004-04-02 09:15:16 +0000
committerJeremias Maerki <jeremias@apache.org>2004-04-02 09:15:16 +0000
commit59019477e8e889b07db387c538570d93c355f1b8 (patch)
treea4e3c480a33d78a40746036de25763a2112e56f9 /src/java/org/apache/fop/pdf/PDFDocument.java
parentee49a2515ca927e7f51e4f3e0efb773d945e2acc (diff)
downloadxmlgraphics-fop-59019477e8e889b07db387c538570d93c355f1b8.tar.gz
xmlgraphics-fop-59019477e8e889b07db387c538570d93c355f1b8.zip
Changed logging to use "static" loggers from Jakarta Commons Logging (via LogFactory).
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197479 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/pdf/PDFDocument.java')
-rw-r--r--src/java/org/apache/fop/pdf/PDFDocument.java24
1 files changed, 3 insertions, 21 deletions
diff --git a/src/java/org/apache/fop/pdf/PDFDocument.java b/src/java/org/apache/fop/pdf/PDFDocument.java
index 9ac36e29d..12960d6c3 100644
--- a/src/java/org/apache/fop/pdf/PDFDocument.java
+++ b/src/java/org/apache/fop/pdf/PDFDocument.java
@@ -29,6 +29,7 @@ import java.util.Map;
import java.util.Iterator;
import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
/* image support modified from work of BoBoGi */
/* font support based on work by Takayuki Takeuchi */
@@ -67,7 +68,7 @@ public class PDFDocument {
*/
public static final String ENCODING = "ISO-8859-1";
- private Log logger;
+ private Log log = LogFactory.getLog("org.apache.fop.pdf");
/**
* the current character position
@@ -234,14 +235,6 @@ public class PDFDocument {
}
/**
- * Sets the Commons-Logging instance for this class
- * @param logger The Commons-Logging instance
- */
- public void setLogger(Log logger) {
- this.logger = logger;
- }
-
- /**
* Returns the factory for PDF objects.
* @return PDFFactory the factory
*/
@@ -260,17 +253,6 @@ public class PDFDocument {
}
/**
- * Helper method to allow sub-classes to aquire logger.
- *
- * <p>There is no performance penalty as this is a final method
- * and will be inlined by the JVM.</p>
- * @return the Logger
- */
- protected final Log getLogger() {
- return this.logger;
- }
-
- /**
* Converts text to a byte array for writing to a PDF file.
* @param text text to convert/encode
* @return byte[] the resulting byte array
@@ -485,7 +467,7 @@ public class PDFDocument {
/**@todo this cast is ugly. PDFObject should be transformed to an interface. */
addTrailerObject((PDFObject)this.encryption);
} else {
- getLogger().warn(
+ log.warn(
"PDF encryption is unavailable. PDF will be "
+ "generated without encryption.");
}