Index: src/java/org/apache/nutch/fetcher/FetcherReducer.java
===================================================================
--- src/java/org/apache/nutch/fetcher/FetcherReducer.java	(revision 1227620)
+++ src/java/org/apache/nutch/fetcher/FetcherReducer.java	(working copy)
@@ -53,7 +53,6 @@
 import org.apache.nutch.storage.Mark;
 import org.apache.nutch.storage.ProtocolStatus;
 import org.apache.nutch.storage.WebPage;
-import org.apache.nutch.util.LogUtil;
 import org.apache.nutch.util.TableUtil;
 import org.apache.nutch.util.URLUtil;
 import org.apache.gora.mapreduce.GoraReducer;
@@ -542,8 +541,7 @@
           } catch (final Throwable t) {                 // unexpected exception
             // unblock
             fetchQueues.finishFetchItem(fit);
-            logError(fit.url, t.toString());
-            t.printStackTrace(LogUtil.getDebugStream(LOG));
+            LOG.error(fit.url, t.toString());
             output(fit, null, ProtocolStatusUtils.STATUS_FAILED,
                 CrawlStatus.STATUS_RETRY);
           }
@@ -551,7 +549,6 @@
 
       } catch (final Throwable e) {
         LOG.error("fetcher caught:"+e.toString());
-        e.printStackTrace(LogUtil.getFatalStream(LOG));
       } finally {
         if (fit != null) fetchQueues.finishFetchItem(fit);
         activeThreads.decrementAndGet(); // count threads
Index: src/java/org/apache/nutch/tools/DmozParser.java
===================================================================
--- src/java/org/apache/nutch/tools/DmozParser.java	(revision 1227620)
+++ src/java/org/apache/nutch/tools/DmozParser.java	(working copy)
@@ -26,14 +26,12 @@
 import org.xml.sax.helpers.*;
 import org.apache.xerces.util.XMLChar;
 
-// Commons Logging imports
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
 import org.apache.hadoop.io.*;
 import org.apache.hadoop.fs.*;
 import org.apache.hadoop.conf.Configuration;
-import org.apache.nutch.util.LogUtil;
 import org.apache.nutch.util.NutchConfiguration;
 
 
@@ -239,7 +237,6 @@
     public void error(SAXParseException spe) {
       if (LOG.isErrorEnabled()) {
         LOG.error("Error: " + spe.toString() + ": " + spe.getMessage());
-        spe.printStackTrace(LogUtil.getFatalStream(LOG));
       }
     }
 
@@ -251,7 +248,6 @@
         LOG.error("Fatal err: " + spe.toString() + ": " + spe.getMessage());
         LOG.error("Last known line is " + location.getLineNumber() +
                   ", column " + location.getColumnNumber());
-        spe.printStackTrace(LogUtil.getFatalStream(LOG));
       }
     }
         
@@ -261,7 +257,6 @@
     public void warning(SAXParseException spe) {
       if (LOG.isWarnEnabled()) {
         LOG.warn("Warning: " + spe.toString() + ": " + spe.getMessage());
-        spe.printStackTrace(LogUtil.getWarnStream(LOG));
       }
     }
   }
@@ -300,8 +295,7 @@
       reader.parse(is);
     } catch (Exception e) {
       if (LOG.isErrorEnabled()) {
-        LOG.error(e.toString());
-        e.printStackTrace(LogUtil.getFatalStream(LOG));
+        LOG.error("Failed to retieve the InputSource: ", e.toString());
       }
       System.exit(0);
     } finally {
@@ -322,8 +316,7 @@
     } 
     catch (Exception e) {
       if (LOG.isErrorEnabled()) {
-        LOG.error(e.toString());
-        e.printStackTrace(LogUtil.getFatalStream(LOG));
+        LOG.error("Failed with the following exception: ", e.toString());
       }
       System.exit(0);
     } finally {
Index: src/java/org/apache/nutch/parse/ParserFactory.java
===================================================================
--- src/java/org/apache/nutch/parse/ParserFactory.java	(revision 1227620)
+++ src/java/org/apache/nutch/parse/ParserFactory.java	(working copy)
@@ -31,7 +31,6 @@
 import org.apache.nutch.plugin.PluginRepository;
 import org.apache.nutch.plugin.PluginRuntimeException;
 import org.apache.nutch.storage.WebPage;
-import org.apache.nutch.util.LogUtil;
 import org.apache.nutch.util.MimeUtil;
 import org.apache.nutch.util.ObjectCache;
 
@@ -132,12 +131,11 @@
         parsers.add(p);
       } catch (PluginRuntimeException e) {
         if (LOG.isWarnEnabled()) {
-          e.printStackTrace(LogUtil.getWarnStream(LOG));
           LOG.warn("ParserFactory:PluginRuntimeException when "
                  + "initializing parser plugin "
                  + ext.getDescriptor().getPluginId()
                  + " instance in getParsers "
-                 + "function: attempting to continue instantiating parsers");
+                 + "function: attempting to continue instantiating parsers: ", e);
         }
       }
     }
Index: src/java/org/apache/nutch/util/DomUtil.java
===================================================================
--- src/java/org/apache/nutch/util/DomUtil.java	(revision 1227620)
+++ src/java/org/apache/nutch/util/DomUtil.java	(working copy)
@@ -66,11 +66,11 @@
       } 
       element = (Element)parser.getDocument().getChildNodes().item(i);
     } catch (FileNotFoundException e) {
-      e.printStackTrace(LogUtil.getWarnStream(LOG));
+        LOG.error("Failed to find file: ", e);
     } catch (SAXException e) {
-      e.printStackTrace(LogUtil.getWarnStream(LOG));
+        LOG.error("Failed with the following SAX exception: ", e);
     } catch (IOException e) {
-      e.printStackTrace(LogUtil.getWarnStream(LOG));
+        LOG.error("Failed with the following IOException", e);
     }
     return element;
   }
@@ -93,13 +93,13 @@
       transformer.transform(source, result);
       os.flush();
     } catch (UnsupportedEncodingException e1) {
-      e1.printStackTrace(LogUtil.getWarnStream(LOG));
+        LOG.error("Failed with the following UnsupportedEncodingException: ", e1);
     } catch (IOException e1) {
-      e1.printStackTrace(LogUtil.getWarnStream(LOG));
+        LOG.error("Failed to with the following IOException: ", e1);
     } catch (TransformerConfigurationException e2) {
-      e2.printStackTrace(LogUtil.getWarnStream(LOG));
+        LOG.error("Failed with the following TransformerConfigurationException: ", e2);
     } catch (TransformerException ex) {
-      ex.printStackTrace(LogUtil.getWarnStream(LOG));
+       LOG.error("Failed with the following TransformerException: ", ex);
     }
   }
 }
Index: src/java/org/apache/nutch/util/LogUtil.java
===================================================================
--- src/java/org/apache/nutch/util/LogUtil.java	(revision 1227620)
+++ src/java/org/apache/nutch/util/LogUtil.java	(working copy)
@@ -1,115 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.nutch.util;
-
-// JDK imports
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.PrintStream;
-import java.lang.reflect.Method;
-
-// Commons Logging imports
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-
-
-/**
- * Utility class for logging.
- *
- * @author J&eacute;r&ocirc;me Charron
- */
-public class LogUtil {
-
-  private final static Logger LOG = LoggerFactory.getLogger(LogUtil.class);
-
-  private static Method TRACE = null;
-  private static Method DEBUG = null;
-  private static Method INFO  = null;
-  private static Method WARN  = null;
-  private static Method ERROR = null;
-  private static Method FATAL = null;
-  
-  static {
-    try {
-      TRACE = Logger.class.getMethod("trace", new Class[] { String.class });
-      DEBUG = Logger.class.getMethod("debug", new Class[] { String.class });
-      INFO  = Logger.class.getMethod("info",  new Class[] { String.class });
-      WARN  = Logger.class.getMethod("warn",  new Class[] { String.class });
-      ERROR = Logger.class.getMethod("error", new Class[] { String.class });
-      FATAL = Logger.class.getMethod("error", new Class[] { String.class });
-    } catch(Exception e) {
-      if (LOG.isErrorEnabled()) {
-        LOG.error("Cannot init log methods", e);
-      }
-    }
-  }
-  
-  
-  public static PrintStream getTraceStream(final Logger logger) {
-    return getLogStream(logger, TRACE);
-  }
-
-  public static PrintStream getDebugStream(final Logger logger) {
-    return getLogStream(logger, DEBUG);
-  }
-
-  public static PrintStream getInfoStream(final Logger logger) {
-    return getLogStream(logger, INFO);
-  }
-  
-  public static PrintStream getWarnStream(final Logger logger) {
-    return getLogStream(logger, WARN);
-  }
-
-  public static PrintStream getErrorStream(final Logger logger) {
-    return getLogStream(logger, ERROR);
-  }
-
-  public static PrintStream getFatalStream(final Logger logger) {
-    return getLogStream(logger, FATAL);
-  }
-  
-  /** Returns a stream that, when written to, adds log lines. */
-  private static PrintStream getLogStream(final Logger logger, final Method method) {
-    return new PrintStream(new ByteArrayOutputStream() {
-        private int scan = 0;
-
-        private boolean hasNewline() {
-          for (; scan < count; scan++) {
-            if (buf[scan] == '\n')
-              return true;
-          }
-          return false;
-        }
-
-        public void flush() throws IOException {
-          if (!hasNewline())
-            return;
-          try {
-            method.invoke(logger, new Object[] { toString().trim() });
-          } catch (Exception e) {
-            if (LOG.isErrorEnabled()) {
-              LOG.error("Cannot log with method [" + method + "]", e);
-            }
-          }
-          reset();
-          scan = 0;
-        }
-      }, true);
-  }
-
-}
Index: src/java/org/apache/nutch/util/EncodingDetector.java
===================================================================
--- src/java/org/apache/nutch/util/EncodingDetector.java	(revision 1227620)
+++ src/java/org/apache/nutch/util/EncodingDetector.java	(working copy)
@@ -185,8 +185,7 @@
           matches = detector.detectAll();
         }
       } catch (Exception e) {
-        LOG.debug("Exception from ICU4J (ignoring): ");
-        e.printStackTrace(LogUtil.getDebugStream(LOG));
+        LOG.debug("Exception from ICU4J (ignoring): ", e);
       }
 
       if (matches != null) {
Index: src/java/org/apache/nutch/util/DeflateUtils.java
===================================================================
--- src/java/org/apache/nutch/util/DeflateUtils.java	(revision 1227620)
+++ src/java/org/apache/nutch/util/DeflateUtils.java	(working copy)
@@ -77,8 +77,7 @@
 	outStream.write(buf, 0, size);
 	written+= size;
       } catch (Exception e) {
-	LOG.info( "Caught Exception in inflateBestEffort" );
-        e.printStackTrace(LogUtil.getWarnStream(LOG));
+	LOG.info( "Caught Exception in inflateBestEffort", e );
 	break;
       }
     }
@@ -128,13 +127,13 @@
     try {
       outStream.write(in);
     } catch (Exception e) {
-      e.printStackTrace(LogUtil.getWarnStream(LOG));
+      LOG.error("Failed to implement outStream.write (input)", e);
     }
 
     try {
       outStream.close();
     } catch (IOException e) {
-      e.printStackTrace(LogUtil.getWarnStream(LOG));
+      LOG.error("Failed to implement outStream.close", e);
     }
 
     return byteOut.toByteArray();
Index: src/java/org/apache/nutch/util/GZIPUtils.java
===================================================================
--- src/java/org/apache/nutch/util/GZIPUtils.java	(revision 1227620)
+++ src/java/org/apache/nutch/util/GZIPUtils.java	(working copy)
@@ -130,19 +130,19 @@
       try {
         outStream.write(in);
       } catch (Exception e) {
-        e.printStackTrace(LogUtil.getWarnStream(LOG));
+        LOG.error("Failed to get outStream.write input", e);
       }
 
       try {
         outStream.close();
       } catch (IOException e) {
-        e.printStackTrace(LogUtil.getWarnStream(LOG));
+        LOG.error("Failed to implement outStream.close", e);
       }
 
       return byteOut.toByteArray();
 
     } catch (IOException e) {
-      e.printStackTrace(LogUtil.getWarnStream(LOG));
+        LOG.error("Failed with IOException", e);
       return null;
     }
   }
Index: src/plugin/urlnormalizer-basic/src/java/org/apache/nutch/net/urlnormalizer/basic/BasicURLNormalizer.java
===================================================================
--- src/plugin/urlnormalizer-basic/src/java/org/apache/nutch/net/urlnormalizer/basic/BasicURLNormalizer.java	(revision 1227620)
+++ src/plugin/urlnormalizer-basic/src/java/org/apache/nutch/net/urlnormalizer/basic/BasicURLNormalizer.java	(working copy)
@@ -26,7 +26,6 @@
 
 // Nutch imports
 import org.apache.nutch.net.URLNormalizer;
-import org.apache.nutch.util.LogUtil;
 
 import org.apache.hadoop.conf.Configuration;
 import org.apache.oro.text.regex.*;
@@ -81,8 +80,7 @@
         adjacentSlashRule.substitution = new Perl5Substitution("/");
         
       } catch (MalformedPatternException e) {
-        e.printStackTrace(LogUtil.getWarnStream(LOG));
-        throw new RuntimeException(e);
+        LOG.error("Failed with the following MalformedPatterException: " + e);
       }
     }
 
Index: src/plugin/scoring-opic/src/java/org/apache/nutch/scoring/opic/OPICScoringFilter.java
===================================================================
--- src/plugin/scoring-opic/src/java/org/apache/nutch/scoring/opic/OPICScoringFilter.java	(revision 1227620)
+++ src/plugin/scoring-opic/src/java/org/apache/nutch/scoring/opic/OPICScoringFilter.java	(working copy)
@@ -35,7 +35,6 @@
 import org.apache.nutch.scoring.ScoringFilterException;
 import org.apache.nutch.storage.WebPage;
 import org.apache.nutch.util.Bytes;
-import org.apache.nutch.util.LogUtil;
 
 /**
  * This plugin implements a variant of an Online Page Importance Computation
@@ -145,7 +144,7 @@
           scoreDatum.setScore(externalScore);
         }
       } catch (MalformedURLException e) {
-        e.printStackTrace(LogUtil.getWarnStream(LOG));
+        LOG.error("Failed with the following MalformedURLException: ", e);
         scoreDatum.setScore(externalScore);
       }
     }
Index: src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java
===================================================================
--- src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java	(revision 1227620)
+++ src/plugin/lib-http/src/java/org/apache/nutch/protocol/http/api/HttpBase.java	(working copy)
@@ -36,7 +36,6 @@
 import org.apache.nutch.storage.WebPage;
 import org.apache.nutch.util.GZIPUtils;
 import org.apache.nutch.util.DeflateUtils;
-import org.apache.nutch.util.LogUtil;
 import org.apache.nutch.util.MimeUtil;
 
 /**
@@ -194,7 +193,7 @@
                 + u));
       }
     } catch (Throwable e) {
-      e.printStackTrace(LogUtil.getErrorStream(logger));
+      logger.error("Failed with the following error: ", e);
       return new ProtocolOutput(null,
           ProtocolStatusUtils.makeStatus(ProtocolStatusCodes.EXCEPTION, e.toString()));
     }
Index: src/plugin/protocol-ftp/src/java/org/apache/nutch/protocol/ftp/FtpResponse.java
===================================================================
--- src/plugin/protocol-ftp/src/java/org/apache/nutch/protocol/ftp/FtpResponse.java	(revision 1227620)
+++ src/plugin/protocol-ftp/src/java/org/apache/nutch/protocol/ftp/FtpResponse.java	(working copy)
@@ -36,7 +36,6 @@
 import org.apache.nutch.net.protocols.Response;
 import org.apache.nutch.protocol.Content;
 import org.apache.nutch.storage.WebPage;
-import org.apache.nutch.util.LogUtil;
 
 
 /************************************
@@ -282,7 +281,6 @@
     } catch (Exception e) {
       if (ftp.LOG.isWarnEnabled()) {
         ftp.LOG.warn(""+e);
-        e.printStackTrace(LogUtil.getWarnStream(ftp.LOG));
       }
       // for any un-foreseen exception (run time exception or not),
       // do ultimate clean and leave ftp.client for garbage collection
Index: src/plugin/subcollection/src/java/org/apache/nutch/collection/CollectionManager.java
===================================================================
--- src/plugin/subcollection/src/java/org/apache/nutch/collection/CollectionManager.java	(revision 1227620)
+++ src/plugin/subcollection/src/java/org/apache/nutch/collection/CollectionManager.java	(working copy)
@@ -36,7 +36,6 @@
 import org.apache.hadoop.conf.Configuration;
 import org.apache.hadoop.conf.Configured;
 import org.apache.nutch.util.DomUtil;
-import org.apache.nutch.util.LogUtil;
 import org.apache.nutch.util.NutchConfiguration;
 import org.apache.nutch.util.ObjectCache;
 import org.apache.xerces.dom.DocumentImpl;
@@ -80,8 +79,7 @@
 			parse(input);
 		} catch (Exception e) {
 			if (LOG.isWarnEnabled()) {
-				LOG.warn("Error occured:" + e);
-				e.printStackTrace(LogUtil.getWarnStream(LOG));
+				LOG.warn("Error occured: " + e);
 			}
 		}
 	}
Index: src/plugin/parse-html/src/java/org/apache/nutch/parse/html/HtmlParser.java
===================================================================
--- src/plugin/parse-html/src/java/org/apache/nutch/parse/html/HtmlParser.java	(revision 1227620)
+++ src/plugin/parse-html/src/java/org/apache/nutch/parse/html/HtmlParser.java	(working copy)
@@ -52,7 +52,6 @@
 import org.apache.nutch.storage.WebPage;
 import org.apache.nutch.util.Bytes;
 import org.apache.nutch.util.EncodingDetector;
-import org.apache.nutch.util.LogUtil;
 import org.apache.nutch.util.NutchConfiguration;
 import org.apache.nutch.util.TableUtil;
 import org.cyberneko.html.parsers.DOMFragmentParser;
@@ -173,13 +172,16 @@
       if (LOG.isTraceEnabled()) { LOG.trace("Parsing..."); }
       root = parse(input);
     } catch (IOException e) {
+      LOG.error("Failed with the following IOException: ", e);
       return ParseStatusUtils.getEmptyParse(e, getConf());
     } catch (DOMException e) {
+      LOG.error("Failed with the following DOMException: ", e);
       return ParseStatusUtils.getEmptyParse(e, getConf());
     } catch (SAXException e) {
+      LOG.error("Failed with the following SAXException: ", e);
       return ParseStatusUtils.getEmptyParse(e, getConf());
     } catch (Exception e) {
-      e.printStackTrace(LogUtil.getWarnStream(LOG));
+      LOG.error("Failed with the following Exception: ", e);
       return ParseStatusUtils.getEmptyParse(e, getConf());
     }
 
@@ -283,7 +285,9 @@
         }
         res.appendChild(frag);
       }
-    } catch (Exception x) { x.printStackTrace(LogUtil.getWarnStream(LOG));};
+    } catch (Exception x) { 
+      LOG.error("Failed with the following Exception: ", x);
+      };
     return res;
   }
 
Index: src/plugin/protocol-httpclient/src/java/org/apache/nutch/protocol/httpclient/Http.java
===================================================================
--- src/plugin/protocol-httpclient/src/java/org/apache/nutch/protocol/httpclient/Http.java	(revision 1227620)
+++ src/plugin/protocol-httpclient/src/java/org/apache/nutch/protocol/httpclient/Http.java	(working copy)
@@ -49,7 +49,6 @@
 // Nutch imports
 import org.apache.nutch.storage.WebPage;
 import org.apache.nutch.storage.WebPage.Field;
-import org.apache.nutch.util.LogUtil;
 import org.apache.nutch.net.protocols.Response;
 import org.apache.nutch.protocol.ProtocolException;
 import org.apache.nutch.protocol.http.api.HttpBase;
@@ -139,7 +138,6 @@
 			if (LOG.isErrorEnabled()) {
 				LOG.error("Could not read " + authFile + " : "
 						+ ex.getMessage());
-				ex.printStackTrace(LogUtil.getErrorStream(LOG));
 			}
 		}
 	}
Index: src/plugin/protocol-httpclient/src/java/org/apache/nutch/protocol/httpclient/HttpAuthenticationFactory.java
===================================================================
--- src/plugin/protocol-httpclient/src/java/org/apache/nutch/protocol/httpclient/HttpAuthenticationFactory.java	(revision 1227620)
+++ src/plugin/protocol-httpclient/src/java/org/apache/nutch/protocol/httpclient/HttpAuthenticationFactory.java	(working copy)
@@ -33,7 +33,6 @@
 
 // Nutch imports
 import org.apache.nutch.metadata.Metadata;
-import org.apache.nutch.util.LogUtil;
 
 
 /**
@@ -135,7 +134,7 @@
 				//TODO Add additional Authentication lookups here
 			}
 		} catch (Exception e) {
-			e.printStackTrace(LogUtil.getErrorStream(LOG));
+			LOG.error("Failed with following exception: ", e);
 		}
         return null;
     }
Index: src/plugin/protocol-http/src/java/org/apache/nutch/protocol/http/HttpResponse.java
===================================================================
--- src/plugin/protocol-http/src/java/org/apache/nutch/protocol/http/HttpResponse.java	(revision 1227620)
+++ src/plugin/protocol-http/src/java/org/apache/nutch/protocol/http/HttpResponse.java	(working copy)
@@ -37,7 +37,6 @@
 import org.apache.nutch.protocol.http.api.HttpBase;
 import org.apache.nutch.protocol.http.api.HttpException;
 import org.apache.nutch.storage.WebPage;
-import org.apache.nutch.util.LogUtil;
 
 /** An HTTP response. */
 public class HttpResponse implements Response {
@@ -307,7 +306,7 @@
           processHeaderLine(line);
         } catch (Exception e) {
           // fixme:
-          e.printStackTrace(LogUtil.getErrorStream(Http.LOG));
+          Http.LOG.error("Failed with the following exception: ", e);
         }
         return;
       }
