tighten up logging

This commit is contained in:
Pim van Pelt
2025-06-24 07:51:37 +02:00
parent 3401c96112
commit 8ed14834f5
4 changed files with 13 additions and 9 deletions

View File

@@ -95,11 +95,11 @@ func (sm *StatsManager) statsRoutine() {
logger.Printf("VPP connection lost, attempting reconnect...")
wasConnected = false
} else {
logger.Debugf("VPP not connected, attempting connection...")
logger.Printf("VPP not connected, attempting connection...")
}
if err := sm.client.Connect(); err != nil {
logger.Debugf("Failed to connect to VPP: %v", err)
logger.Printf("Failed to connect to VPP: %v", err)
time.Sleep(time.Second)
continue
}
@@ -139,8 +139,8 @@ func (sm *StatsManager) queryAndReportStats() bool {
return false
}
// Always log basic info
logger.Printf("Retrieved stats for %d interfaces", len(stats.Interfaces))
// Debug log basic info
logger.Debugf("Retrieved stats for %d interfaces", len(stats.Interfaces))
// Debug logging for individual interfaces
for _, iface := range stats.Interfaces {