From e1c3979af711b0ec30d567fdcc87edd513663555 Mon Sep 17 00:00:00 2001
From: zzz <zzz@mail.i2p>
Date: Tue, 6 Mar 2012 14:01:13 +0000
Subject: [PATCH]   * Jetty logger: Fix stack trace logging

---
 apps/jetty/java/src/net/i2p/jetty/I2PLogger.java | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/apps/jetty/java/src/net/i2p/jetty/I2PLogger.java b/apps/jetty/java/src/net/i2p/jetty/I2PLogger.java
index 7e5fe91d2c..d209c8be7b 100644
--- a/apps/jetty/java/src/net/i2p/jetty/I2PLogger.java
+++ b/apps/jetty/java/src/net/i2p/jetty/I2PLogger.java
@@ -63,6 +63,8 @@ public class I2PLogger implements Logger
     {
         if (arg0 == null && arg1 == null) {
             _log.info(msg);
+        } else if (arg0 != null && arg1 == null && arg0 instanceof Throwable) {
+            _log.info(msg, (Throwable) arg0);
         } else if (_log.shouldLog(Log.INFO)) {
             synchronized(_buffer) {
                 format(msg,arg0,arg1);
@@ -80,6 +82,8 @@ public class I2PLogger implements Logger
     {
         if (arg0 == null && arg1 == null) {
             _log.debug(msg);
+        } else if (arg0 != null && arg1 == null && arg0 instanceof Throwable) {
+            _log.debug(msg, (Throwable) arg0);
         } else if (_log.shouldLog(Log.DEBUG)) {
             synchronized(_buffer) {
                 format(msg,arg0,arg1);
@@ -92,6 +96,8 @@ public class I2PLogger implements Logger
     {
         if (arg0 == null && arg1 == null) {
             _log.warn(msg);
+        } else if (arg0 != null && arg1 == null && arg0 instanceof Throwable) {
+            _log.warn(msg, (Throwable) arg0);
         } else if (_log.shouldLog(Log.WARN)) {
             synchronized(_buffer) {
                 format(msg,arg0,arg1);
-- 
GitLab