Jetty: Log stack trace if 2nd arg is a Throwable (ticket #2592)

This commit is contained in:
zzz
2019-08-18 14:53:32 +00:00
parent b2dec2f4b2
commit 64ba43c007
3 changed files with 21 additions and 5 deletions

View File

@ -73,7 +73,10 @@ public class I2PLogger implements Logger
} else if (_log.shouldLog(Log.INFO)) {
synchronized(_buffer) {
format(msg,arg0,arg1);
_log.info(_buffer.toString());
if (arg1 != null && arg1 instanceof Throwable)
_log.info(_buffer.toString(), (Throwable) arg1);
else
_log.info(_buffer.toString());
}
}
}
@ -92,7 +95,10 @@ public class I2PLogger implements Logger
} else if (_log.shouldLog(Log.DEBUG)) {
synchronized(_buffer) {
format(msg,arg0,arg1);
_log.debug(_buffer.toString());
if (arg1 != null && arg1 instanceof Throwable)
_log.debug(_buffer.toString(), (Throwable) arg1);
else
_log.debug(_buffer.toString());
}
}
}
@ -106,7 +112,10 @@ public class I2PLogger implements Logger
} else if (_log.shouldLog(Log.WARN)) {
synchronized(_buffer) {
format(msg,arg0,arg1);
_log.warn(_buffer.toString());
if (arg1 != null && arg1 instanceof Throwable)
_log.warn(_buffer.toString(), (Throwable) arg1);
else
_log.warn(_buffer.toString());
}
}
}

View File

@ -1,3 +1,10 @@
2019-08-18 zzz
* Jetty: Log stack trace if 2nd arg is a Throwable (ticket #2592)
2019-08-15 zzz
* SSU: Reduce ACK time to 150 (ticket #2574)
* Tunnels: Reduce IBGW batching ti9me (ticket #2586)
2019-08-14 zzz
* Console: Clean up help text, tag for translation (ticket #2298)

View File

@ -18,10 +18,10 @@ public class RouterVersion {
/** deprecated */
public final static String ID = "Monotone";
public final static String VERSION = CoreVersion.VERSION;
public final static long BUILD = 8;
public final static long BUILD = 9;
/** for example "-test" */
public final static String EXTRA = "";
public final static String EXTRA = "-rc";
public final static String FULL_VERSION = VERSION + "-" + BUILD + EXTRA;
public static void main(String args[]) {
System.out.println("I2P Router version: " + FULL_VERSION);