Skip to content
This repository was archived by the owner on Dec 6, 2022. It is now read-only.

Commit 09206ec

Browse files
committed
proxy-server: fixes log lines that should be using InfoS instead of Infoln
Signed-off-by: Andrew Sy Kim <[email protected]>
1 parent 6df0268 commit 09206ec

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pkg/server/server.go

+5-5
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ func (s *ProxyServer) serveRecvFrontend(stream client.ProxyService_ProxyServer,
429429
Payload: &client.Packet_DialResponse{DialResponse: &client.DialResponse{Error: err.Error()}},
430430
}
431431
if err := stream.Send(resp); err != nil {
432-
klog.V(5).Infoln("Failed to send DIAL_RSP for no backend", "error", err, "serverID", s.serverID)
432+
klog.V(5).InfoS("Failed to send DIAL_RSP for no backend", "error", err, "serverID", s.serverID)
433433
}
434434
// The Dial is failing; no reason to keep this goroutine.
435435
return
@@ -462,15 +462,15 @@ func (s *ProxyServer) serveRecvFrontend(stream client.ProxyService_ProxyServer,
462462
// TODO: retry with other backends connecting to this agent.
463463
klog.ErrorS(err, "CLOSE_REQ to Backend failed", "serverID", s.serverID, "connectionID", connID)
464464
} else {
465-
klog.V(5).Infoln("CLOSE_REQ sent to backend", "serverID", s.serverID, "connectionID", connID)
465+
klog.V(5).InfoS("CLOSE_REQ sent to backend", "serverID", s.serverID, "connectionID", connID)
466466
}
467467

468468
case client.PacketType_DIAL_CLS:
469469
random := pkt.GetCloseDial().Random
470470
klog.V(5).InfoS("Received DIAL_CLOSE", "serverID", s.serverID, "dialID", random)
471471
// Currently not worrying about backend as we do not have an established connection,
472472
s.PendingDial.Remove(random)
473-
klog.V(5).Infoln("Removing pending dial request", "serverID", s.serverID, "dialID", random)
473+
klog.V(5).InfoS("Removing pending dial request", "serverID", s.serverID, "dialID", random)
474474

475475
case client.PacketType_DATA:
476476
connID := pkt.GetData().ConnectID
@@ -717,7 +717,7 @@ func (s *ProxyServer) serveRecvBackend(backend Backend, stream agent.AgentServic
717717
klog.V(5).InfoS("Received DIAL_RSP", "dialID", resp.Random, "agentID", agentID, "connectionID", resp.ConnectID)
718718

719719
if frontend, ok := s.PendingDial.Get(resp.Random); !ok {
720-
klog.V(2).Infoln("DIAL_RSP not recognized; dropped", "dialID", resp.Random, "agentID", agentID, "connectionID", resp.ConnectID)
720+
klog.V(2).InfoS("DIAL_RSP not recognized; dropped", "dialID", resp.Random, "agentID", agentID, "connectionID", resp.ConnectID)
721721
} else {
722722
dialErr := false
723723
if resp.Error != "" {
@@ -768,7 +768,7 @@ func (s *ProxyServer) serveRecvBackend(backend Backend, stream agent.AgentServic
768768
// Normal when frontend closes it.
769769
klog.ErrorS(err, "CLOSE_RSP send to client stream error", "serverID", s.serverID, "agentID", agentID, "connectionID", resp.ConnectID)
770770
} else {
771-
klog.V(5).Infoln("CLOSE_RSP sent to frontend", "connectionID", resp.ConnectID)
771+
klog.V(5).InfoS("CLOSE_RSP sent to frontend", "connectionID", resp.ConnectID)
772772
}
773773
s.removeFrontend(agentID, resp.ConnectID)
774774
klog.V(5).InfoS("Close streaming", "agentID", agentID, "connectionID", resp.ConnectID)

0 commit comments

Comments
 (0)