forked from I2P_Developers/i2p.i2p
Jetty: Fix URI in request logs
Use standard getRequestURI() instead of Jetty internal getHttpURI(), which apparently changed somewhere along the way Hide Jetty ClosedChannelException from I2P logs
This commit is contained in:
@@ -14,6 +14,8 @@
|
||||
|
||||
package net.i2p.jetty;
|
||||
|
||||
import java.nio.channels.ClosedChannelException;
|
||||
|
||||
import net.i2p.I2PAppContext;
|
||||
import net.i2p.util.Log;
|
||||
|
||||
@@ -127,7 +129,7 @@ public class I2PLogger implements Logger
|
||||
if (th != null) {
|
||||
if (_log.shouldLog(Log.WARN))
|
||||
_log.warn(msg, th);
|
||||
else
|
||||
else if (!(th instanceof ClosedChannelException))
|
||||
_log.logAlways(Log.WARN, msg + ": " + th);
|
||||
} else {
|
||||
_log.logAlways(Log.WARN, msg);
|
||||
|
||||
@@ -317,7 +317,7 @@ public class I2PRequestLog extends AbstractLifeCycle implements RequestLog
|
||||
buf.append(request.getMethod());
|
||||
buf.append(' ');
|
||||
|
||||
u8buf.append(request.getHttpURI().toString());
|
||||
u8buf.append(request.getRequestURI());
|
||||
|
||||
buf.append(' ');
|
||||
buf.append(request.getProtocol());
|
||||
|
||||
Reference in New Issue
Block a user