Author: jnioche
Date: Tue Aug 24 13:57:19 2010
New Revision: 988544
URL: http://svn.apache.org/viewvc?rev=988544&view=rev
Log:
Fixed LogUtil : now works with underlying log facade
Modified:
nutch/trunk/src/java/org/apache/nutch/util/LogUtil.java
Modified: nutch/trunk/src/java/org/apache/nutch/util/LogUtil.java
URL:
http://svn.apache.org/viewvc/nutch/trunk/src/java/org/apache/nutch/util/LogUtil.java?rev=988544&r1=988543&r2=988544&view=diff
==============================================================================
--- nutch/trunk/src/java/org/apache/nutch/util/LogUtil.java (original)
+++ nutch/trunk/src/java/org/apache/nutch/util/LogUtil.java Tue Aug 24 13:57:19
2010
@@ -42,15 +42,15 @@ public class LogUtil {
private static Method WARN = null;
private static Method ERROR = null;
private static Method FATAL = null;
-
+
static {
try {
- TRACE = Logger.class.getMethod("trace", new Class[] { Object.class });
- DEBUG = Logger.class.getMethod("debug", new Class[] { Object.class });
- INFO = Logger.class.getMethod("info", new Class[] { Object.class });
- WARN = Logger.class.getMethod("warn", new Class[] { Object.class });
- ERROR = Logger.class.getMethod("error", new Class[] { Object.class });
- FATAL = Logger.class.getMethod("fatal", new Class[] { Object.class });
+ 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);
@@ -100,7 +100,7 @@ public class LogUtil {
if (!hasNewline())
return;
try {
- method.invoke(logger, new Object[] { toString().trim() });
+ method.invoke(logger, new String[] { toString().trim() });
} catch (Exception e) {
if (LOG.isErrorEnabled()) {
LOG.error("Cannot log with method [" + method + "]", e);