Skip to content

Commit 65b9c80

Browse files
k8s-ci-robotipochi
authored andcommitted
Merge pull request #762 from kinvolk/imran/log-level-changes
fix: update log levels (cherry picked from commit 3737fb2)
1 parent 3e20159 commit 65b9c80

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

pkg/server/backend_manager.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,10 +299,10 @@ func containIDType(idTypes []header.IdentifierType, idType header.IdentifierType
299299
// addBackend adds a backend.
300300
func (s *DefaultBackendStorage) addBackend(identifier string, idType header.IdentifierType, backend *Backend) {
301301
if !containIDType(s.idTypes, idType) {
302-
klog.V(4).InfoS("fail to add backend", "backend", identifier, "error", &ErrWrongIDType{idType, s.idTypes})
302+
klog.V(3).InfoS("fail to add backend", "backend", identifier, "error", &ErrWrongIDType{idType, s.idTypes})
303303
return
304304
}
305-
klog.V(5).InfoS("Register backend for agent", "agentID", identifier)
305+
klog.V(2).InfoS("Register backend for agent", "agentID", identifier)
306306
s.mu.Lock()
307307
defer s.mu.Unlock()
308308
_, ok := s.backends[identifier]
@@ -327,7 +327,7 @@ func (s *DefaultBackendStorage) removeBackend(identifier string, idType header.I
327327
klog.ErrorS(&ErrWrongIDType{idType, s.idTypes}, "fail to remove backend")
328328
return
329329
}
330-
klog.V(5).InfoS("Remove connection for agent", "agentID", identifier)
330+
klog.V(2).InfoS("Remove connection for agent", "agentID", identifier)
331331
s.mu.Lock()
332332
defer s.mu.Unlock()
333333
backends, ok := s.backends[identifier]
@@ -400,7 +400,7 @@ func (s *DefaultBackendStorage) GetRandomBackend() (*Backend, error) {
400400
return nil, &ErrNotFound{}
401401
}
402402
agentID := s.agentIDs[s.random.Intn(len(s.agentIDs))]
403-
klog.V(5).InfoS("Pick agent as backend", "agentID", agentID)
403+
klog.V(3).InfoS("Pick agent as backend", "agentID", agentID)
404404
// always return the first connection to an agent, because the agent
405405
// will close later connections if there are multiple.
406406
return s.backends[agentID][0], nil

pkg/server/server.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ func (s *ProxyServer) Connect(stream agent.AgentService_ConnectServer) error {
718718
}
719719
agentID := backend.GetAgentID()
720720

721-
klog.V(5).InfoS("Connect request from agent", "agentID", agentID, "serverID", s.serverID)
721+
klog.V(2).InfoS("Connect request from agent", "agentID", agentID, "serverID", s.serverID)
722722
labels := runpprof.Labels(
723723
"serverCount", strconv.Itoa(s.serverCount),
724724
"agentID", agentID,
@@ -945,7 +945,7 @@ func (s *ProxyServer) serveRecvBackend(backend *Backend, agentID string, recvCh
945945
klog.V(5).InfoS("Ignoring unrecognized packet from backend", "packet", pkt, "agentID", agentID)
946946
}
947947
}
948-
klog.V(5).InfoS("Close backend of agent", "agentID", agentID)
948+
klog.V(3).InfoS("Close backend of agent", "agentID", agentID)
949949
}
950950

951951
func (s *ProxyServer) sendBackendClose(backend *Backend, connectID int64, random int64, reason string) {

0 commit comments

Comments
 (0)