From 39e7bbdc6de82e77b43ff3d0e755e2a8b8f9b554 Mon Sep 17 00:00:00 2001 From: chrislu Date: Wed, 15 Oct 2025 20:01:28 -0700 Subject: [PATCH] less logs --- weed/mq/kafka/protocol/find_coordinator.go | 5 +---- weed/mq/kafka/protocol/handler.go | 6 ++---- weed/mq/kafka/protocol/offset_management.go | 12 ++++-------- 3 files changed, 7 insertions(+), 16 deletions(-) diff --git a/weed/mq/kafka/protocol/find_coordinator.go b/weed/mq/kafka/protocol/find_coordinator.go index f6f719051..9308cc338 100644 --- a/weed/mq/kafka/protocol/find_coordinator.go +++ b/weed/mq/kafka/protocol/find_coordinator.go @@ -29,10 +29,7 @@ type CoordinatorAssignment struct { } func (h *Handler) handleFindCoordinator(correlationID uint32, apiVersion uint16, requestBody []byte) ([]byte, error) { - glog.V(0).Infof("═══════════════════════════════════════════════════════════════") - glog.V(0).Infof(" 🔍 FIND_COORDINATOR API CALLED (ApiKey 10) version=%d", apiVersion) - glog.V(0).Infof("═══════════════════════════════════════════════════════════════") - glog.V(4).Infof("FindCoordinator ENTRY: version=%d, correlation=%d, bodyLen=%d", apiVersion, correlationID, len(requestBody)) + glog.V(2).Infof("FindCoordinator: version=%d, correlation=%d, bodyLen=%d", apiVersion, correlationID, len(requestBody)) switch apiVersion { case 0: glog.V(4).Infof("FindCoordinator - Routing to V0 handler") diff --git a/weed/mq/kafka/protocol/handler.go b/weed/mq/kafka/protocol/handler.go index 8730d00ac..87bb0d5ed 100644 --- a/weed/mq/kafka/protocol/handler.go +++ b/weed/mq/kafka/protocol/handler.go @@ -1036,10 +1036,8 @@ func (h *Handler) processRequestSync(req *kafkaRequest) ([]byte, error) { requestStart := time.Now() apiName := getAPIName(APIKey(req.apiKey)) - // ═══════════════════════════════════════════════════════════════ - // LOG ALL INCOMING KAFKA API CALLS - // ═══════════════════════════════════════════════════════════════ - glog.V(0).Infof("🔵 [API] %s (key=%d, ver=%d, corr=%d)", + // Debug: Log API calls at verbose level 2 (disabled by default) + glog.V(2).Infof("[API] %s (key=%d, ver=%d, corr=%d)", apiName, req.apiKey, req.apiVersion, req.correlationID) var response []byte diff --git a/weed/mq/kafka/protocol/offset_management.go b/weed/mq/kafka/protocol/offset_management.go index c8aa6744e..cc8a8de46 100644 --- a/weed/mq/kafka/protocol/offset_management.go +++ b/weed/mq/kafka/protocol/offset_management.go @@ -198,10 +198,6 @@ func (h *Handler) handleOffsetCommit(correlationID uint32, apiVersion uint16, re } func (h *Handler) handleOffsetFetch(correlationID uint32, apiVersion uint16, requestBody []byte) ([]byte, error) { - glog.V(0).Infof("═══════════════════════════════════════════════════════════════") - glog.V(0).Infof(" 🔍 OFFSET_FETCH API CALLED (ApiKey 9)") - glog.V(0).Infof("═══════════════════════════════════════════════════════════════") - // Parse OffsetFetch request request, err := h.parseOffsetFetchRequest(requestBody) if err != nil { @@ -222,7 +218,7 @@ func (h *Handler) handleOffsetFetch(correlationID uint32, apiVersion uint16, req group.Mu.RLock() defer group.Mu.RUnlock() - glog.V(0).Infof("[OFFSET_FETCH] Request: group=%s topics=%d", request.GroupID, len(request.Topics)) + glog.V(2).Infof("[OFFSET_FETCH] Request: group=%s topics=%d", request.GroupID, len(request.Topics)) // Build response response := OffsetFetchResponse{ @@ -258,7 +254,7 @@ func (h *Handler) handleOffsetFetch(correlationID uint32, apiVersion uint16, req if off, meta, err := h.fetchOffset(group, topic.Name, partition); err == nil && off >= 0 { fetchedOffset = off metadata = meta - glog.V(0).Infof("[OFFSET_FETCH] ✓ Found in memory: group=%s topic=%s partition=%d offset=%d", + glog.V(2).Infof("[OFFSET_FETCH] Found in memory: group=%s topic=%s partition=%d offset=%d", request.GroupID, topic.Name, partition, off) } else { // Fallback: try fetching from SMQ persistent storage @@ -272,10 +268,10 @@ func (h *Handler) handleOffsetFetch(correlationID uint32, apiVersion uint16, req if off, meta, err := h.fetchOffsetFromSMQ(key); err == nil && off >= 0 { fetchedOffset = off metadata = meta - glog.V(0).Infof("[OFFSET_FETCH] ✓ Found in storage: group=%s topic=%s partition=%d offset=%d", + glog.V(2).Infof("[OFFSET_FETCH] Found in storage: group=%s topic=%s partition=%d offset=%d", request.GroupID, topic.Name, partition, off) } else { - glog.V(0).Infof("[OFFSET_FETCH] ✗ No offset found: group=%s topic=%s partition=%d (will start from auto.offset.reset)", + glog.V(2).Infof("[OFFSET_FETCH] No offset found: group=%s topic=%s partition=%d (will start from auto.offset.reset)", request.GroupID, topic.Name, partition) } // No offset found in either location (-1 indicates no committed offset)