cleanup logs

This commit is contained in:
Lucas Clemente
2016-05-06 14:31:54 +02:00
parent 3cfc9b66a8
commit a1f6289587
5 changed files with 6 additions and 6 deletions

View File

@@ -84,7 +84,7 @@ func (r *RTTStats) SetRecentMinRTTwindow(recentMinRTTwindow time.Duration) {
// UpdateRTT updates the RTT based on a new sample.
func (r *RTTStats) UpdateRTT(sendDelta, ackDelay time.Duration, now time.Time) {
if sendDelta == math.MaxInt64 || sendDelta <= 0 {
utils.Infof("Ignoring measured sendDelta, because it's is either infinite, zero, or negative: %d", sendDelta/time.Microsecond)
utils.Debugf("Ignoring measured sendDelta, because it's is either infinite, zero, or negative: %d", sendDelta/time.Microsecond)
return
}

View File

@@ -50,7 +50,7 @@ func (w *responseWriter) WriteHeader(status int) {
enc.WriteField(hpack.HeaderField{Name: k, Value: v[0]})
}
utils.Infof("Responding with %d %#v", status, w.header)
utils.Infof("Responding with %d", status)
h2framer := http2.NewFramer(w.headerStream, nil)
err := h2framer.WriteHeaders(http2.HeadersFrameParam{
StreamID: uint32(w.dataStreamID),

View File

@@ -74,7 +74,7 @@ func (s *Server) handleRequest(session *quic.Session, headerStream utils.Stream,
if err != nil {
return err
}
utils.Infof("Request: %#v", req)
utils.Infof("%s %s%s", req.Method, req.Host, req.RequestURI)
responseWriter := &responseWriter{
header: http.Header{},

View File

@@ -107,7 +107,7 @@ func (s *Server) handlePacket(conn *net.UDPConn, remoteAddr *net.UDPAddr, packet
s.sessionsMutex.RUnlock()
if !ok {
utils.Infof("Serving new connection: %d from %v", publicHeader.ConnectionID, remoteAddr)
utils.Infof("Serving new connection: %x from %v", publicHeader.ConnectionID, remoteAddr)
session = s.newSession(
&udpConn{conn: conn, currentAddr: remoteAddr},
publicHeader.VersionNumber,

View File

@@ -149,7 +149,7 @@ func (s *Session) handlePacket(remoteAddr interface{}, publicHeader *PublicHeade
publicHeader.PacketNumber,
)
s.lastRcvdPacketNumber = publicHeader.PacketNumber
utils.Infof("<- Reading packet 0x%x (%d bytes) for connection %x", publicHeader.PacketNumber, r.Size(), publicHeader.ConnectionID)
utils.Debugf("<- Reading packet 0x%x (%d bytes) for connection %x", publicHeader.PacketNumber, r.Size(), publicHeader.ConnectionID)
// TODO: Only do this after authenticating
s.conn.setCurrentRemoteAddr(remoteAddr)
@@ -369,7 +369,7 @@ func (s *Session) sendPacket() error {
s.stopWaitingManager.SentStopWaitingWithPacket(packet.number)
utils.Infof("-> Sending packet 0x%x (%d bytes)", packet.number, len(packet.raw))
utils.Debugf("-> Sending packet 0x%x (%d bytes)", packet.number, len(packet.raw))
for _, frame := range packet.frames {
if streamFrame, isStreamFrame := frame.(*frames.StreamFrame); isStreamFrame {
utils.Debugf("\t-> &frames.StreamFrame{StreamID: %d, FinBit: %t, Offset: 0x%x, Data length: 0x%x, Offset + Data length: 0x%x}", streamFrame.StreamID, streamFrame.FinBit, streamFrame.Offset, len(streamFrame.Data), streamFrame.Offset+protocol.ByteCount(len(streamFrame.Data)))