diff --git a/apps/jetty/java/src/net/i2p/jetty/I2PLogger.java b/apps/jetty/java/src/net/i2p/jetty/I2PLogger.java index cbf531801f8326e1630a52e557e9af53523f332e..5d3e421293d95ad31116587aff1421c92aef718e 100644 --- a/apps/jetty/java/src/net/i2p/jetty/I2PLogger.java +++ b/apps/jetty/java/src/net/i2p/jetty/I2PLogger.java @@ -102,7 +102,7 @@ public class I2PLogger implements Logger if (arg0 == null && arg1 == null) { _log.warn(msg); } else if (arg0 != null && arg1 == null && arg0 instanceof Throwable) { - _log.error(msg, (Throwable) arg0); + warn(msg, (Throwable) arg0); } else if (_log.shouldLog(Log.WARN)) { synchronized(_buffer) { format(msg,arg0,arg1); @@ -113,11 +113,12 @@ public class I2PLogger implements Logger public void warn(String msg, Throwable th) { - // This doesn't cover ClassNotFoundException, etc. - //if (th instanceof RuntimeException || th instanceof Error) - _log.error(msg, th); - //else - // _log.warn(msg,th); + // some of these are serious, some aren't + // no way to get it right + if (th != null) + _log.logAlways(Log.WARN, msg + ": " + th); + else + _log.logAlways(Log.WARN, msg); } private void format(String msg, Object arg0, Object arg1)