Tags: patch

By default, FOP uses log4j for logging, if it is available. This
behavior can be overridden, however, by setting the
org.apache.commons.logging.Log system property.

Since in Debian the fop package depends on libcommons-logging-java but
not on liblog4j1.2-java, assume that the
org.apache.commons.logging.impl.SimpleLog implementation is always
available (whereas log4j might not be). Thus, pass in an appropriate
value for org.apache.commons.logging.Log via the LOGGING variable in
fop.sh. This can, of course, be overridden from a system-wide or
per-user configuration file.

Signed-off-by: Florian Haas <florian.h...@linbit.com>
---
 debian/fop.sh |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/debian/fop.sh b/debian/fop.sh
index 6130d45..f5a6f06 100644
--- a/debian/fop.sh
+++ b/debian/fop.sh
@@ -15,7 +15,11 @@
 # in your fop configuration file.
 HEADLESS=-Djava.awt.headless=true
 
-
+# To override the default logging configuration, add a LOGGING line to
+# your fop configuration file. To disable logging altogether, set
+#  LOGGING=
+# in your configuration file.
+LOGGING="-Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.SimpleLog"
 
 # Load system-wide configuration, if any
 if [ -f /etc/fop.conf ]; then
@@ -42,4 +46,4 @@ find_jars fop
 
 
 
-run_java $HEADLESS org.apache.fop.cli.Main "$@"
+run_java $HEADLESS $LOGGING org.apache.fop.cli.Main "$@"
-- 
1.7.1




-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to