Skip to content

Commit 3737fb2

Browse files
authored
Merge pull request #762 from kinvolk/imran/log-level-changes
fix: update log levels
2 parents 7c3b62c + 1dcb74a commit 3737fb2

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
@@ -244,10 +244,10 @@ func containIDType(idTypes []header.IdentifierType, idType header.IdentifierType
244244
// addBackend adds a backend.
245245
func (s *DefaultBackendStorage) addBackend(identifier string, idType header.IdentifierType, backend *Backend) {
246246
if !containIDType(s.idTypes, idType) {
247-
klog.V(4).InfoS("fail to add backend", "backend", identifier, "error", &ErrWrongIDType{idType, s.idTypes})
247+
klog.V(3).InfoS("fail to add backend", "backend", identifier, "error", &ErrWrongIDType{idType, s.idTypes})
248248
return
249249
}
250-
klog.V(5).InfoS("Register backend for agent", "agentID", identifier)
250+
klog.V(2).InfoS("Register backend for agent", "agentID", identifier)
251251
s.mu.Lock()
252252
defer s.mu.Unlock()
253253
_, ok := s.backends[identifier]
@@ -273,7 +273,7 @@ func (s *DefaultBackendStorage) removeBackend(identifier string, idType header.I
273273
klog.ErrorS(&ErrWrongIDType{idType, s.idTypes}, "fail to remove backend")
274274
return
275275
}
276-
klog.V(5).InfoS("Remove connection for agent", "agentID", identifier)
276+
klog.V(2).InfoS("Remove connection for agent", "agentID", identifier)
277277
s.mu.Lock()
278278
defer s.mu.Unlock()
279279
backends, ok := s.backends[identifier]
@@ -347,7 +347,7 @@ func (s *DefaultBackendStorage) GetRandomBackend() (*Backend, error) {
347347
return nil, &ErrNotFound{}
348348
}
349349
agentID := s.agentIDs[s.random.Intn(len(s.agentIDs))]
350-
klog.V(5).InfoS("Pick agent as backend", "agentID", agentID)
350+
klog.V(3).InfoS("Pick agent as backend", "agentID", agentID)
351351
// always return the first connection to an agent, because the agent
352352
// will close later connections if there are multiple.
353353
return s.backends[agentID][0], nil

pkg/server/server.go

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

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

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

0 commit comments

Comments
 (0)