Optimize logging to reduce verbosity while preserving critical network events (#432)

- Remove excessive verbose logging (DISCOVERY, INCOMING, PEER-UPDATE, etc.)
- Preserve critical network state logs (RESTORE, handshake failures, security events)
- Change routine key operations from info to debug level
- Add successful peer connection log after handshake completion
- Fix compiler warnings for unused variables
- Achieve ~95% reduction in log volume while maintaining debugging capability

Co-authored-by: jack <jackjackbits@users.noreply.github.com>
This commit is contained in:
jack
2025-08-11 23:45:59 +02:00
committed by GitHub
co-authored by jack
parent 04c2b0caa6
commit 3226b9cd14
8 changed files with 31 additions and 152 deletions
-2
View File
@@ -212,8 +212,6 @@ class PeerManager: ObservableObject {
}
// Add offline favorites (only those not currently connected/relay-connected AND that we actively favorite)
SecureLogger.log("📋 Processing \(favoritesService.favorites.count) favorite relationships (connected/relay nicknames: \(connectedNicknames))",
category: SecureLogger.session, level: .info)
for (favoriteKey, favorite) in favoritesService.favorites {
let favoriteID = favorite.peerNoisePublicKey.hexEncodedString()