mirror of
https://github.com/jetty/jetty.project.git
synced 2025-03-03 04:19:12 +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();
|
||||
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()]));
|
||||
return Action.SCHEDULED;
|
||||
}
|
||||
@ -739,6 +739,9 @@ public abstract class HTTP2Session implements ISession, Parser.Listener
|
||||
complete.add(active.get(i));
|
||||
active.clear();
|
||||
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug("Written {} frames for {}", complete.size(), complete);
|
||||
|
||||
// Drain the queue one by one to avoid reentrancy.
|
||||
while (!complete.isEmpty())
|
||||
{
|
||||
|
@ -75,6 +75,6 @@ public class DataFrame extends Frame
|
||||
@Override
|
||||
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;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString()
|
||||
{
|
||||
return String.format("%s#%d", super.toString(), streamId);
|
||||
}
|
||||
}
|
||||
|
@ -151,8 +151,9 @@ public class Parser
|
||||
}
|
||||
catch (Throwable x)
|
||||
{
|
||||
LOG.debug(x);
|
||||
notifyConnectionFailure(ErrorCodes.PROTOCOL_ERROR, "parser_error: "+x);
|
||||
if (LOG.isDebugEnabled())
|
||||
LOG.debug(x);
|
||||
notifyConnectionFailure(ErrorCodes.PROTOCOL_ERROR, "parser_error");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user