mirror of
https://github.com/jetty/jetty.project.git
synced 2025-03-03 20:39:18 +00:00
Improved logging.
This commit is contained in:
parent
1fb07644a1
commit
e332aa9c43
@ -724,7 +724,7 @@ public abstract class HTTP2Session implements ISession, Parser.Listener
|
|||||||
|
|
||||||
List<ByteBuffer> byteBuffers = lease.getByteBuffers();
|
List<ByteBuffer> byteBuffers = lease.getByteBuffers();
|
||||||
if (LOG.isDebugEnabled())
|
if (LOG.isDebugEnabled())
|
||||||
LOG.debug("Writing {} buffers ({} bytes) for {}", byteBuffers.size(), lease.getTotalLength(), active);
|
LOG.debug("Writing {} buffers ({} bytes) for {} frames {}", byteBuffers.size(), lease.getTotalLength(), active.size(), active);
|
||||||
endPoint.write(this, byteBuffers.toArray(new ByteBuffer[byteBuffers.size()]));
|
endPoint.write(this, byteBuffers.toArray(new ByteBuffer[byteBuffers.size()]));
|
||||||
return Action.SCHEDULED;
|
return Action.SCHEDULED;
|
||||||
}
|
}
|
||||||
@ -739,6 +739,9 @@ public abstract class HTTP2Session implements ISession, Parser.Listener
|
|||||||
complete.add(active.get(i));
|
complete.add(active.get(i));
|
||||||
active.clear();
|
active.clear();
|
||||||
|
|
||||||
|
if (LOG.isDebugEnabled())
|
||||||
|
LOG.debug("Written {} frames for {}", complete.size(), complete);
|
||||||
|
|
||||||
// Drain the queue one by one to avoid reentrancy.
|
// Drain the queue one by one to avoid reentrancy.
|
||||||
while (!complete.isEmpty())
|
while (!complete.isEmpty())
|
||||||
{
|
{
|
||||||
|
@ -75,6 +75,6 @@ public class DataFrame extends Frame
|
|||||||
@Override
|
@Override
|
||||||
public String toString()
|
public String toString()
|
||||||
{
|
{
|
||||||
return String.format("%s{length:%d,end=%b}", super.toString(), data.remaining(), endStream);
|
return String.format("%s#%d{length:%d,end=%b}", super.toString(), streamId, data.remaining(), endStream);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -55,4 +55,10 @@ public class HeadersFrame extends Frame
|
|||||||
{
|
{
|
||||||
return endStream;
|
return endStream;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString()
|
||||||
|
{
|
||||||
|
return String.format("%s#%d", super.toString(), streamId);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -151,8 +151,9 @@ public class Parser
|
|||||||
}
|
}
|
||||||
catch (Throwable x)
|
catch (Throwable x)
|
||||||
{
|
{
|
||||||
LOG.debug(x);
|
if (LOG.isDebugEnabled())
|
||||||
notifyConnectionFailure(ErrorCodes.PROTOCOL_ERROR, "parser_error: "+x);
|
LOG.debug(x);
|
||||||
|
notifyConnectionFailure(ErrorCodes.PROTOCOL_ERROR, "parser_error");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user