Adjust logging level for frequent / low-level events (#130)

This commit is contained in:
Mattt 2025-06-05 05:36:37 -07:00 • committed by GitHub
commit 7a76001187
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -408,7 +408,7 @@ import Logging
})
}
logger.debug("Heartbeat sent")
logger.trace("Heartbeat sent")
}
/// Handles connection failure
@ -638,11 +638,11 @@ import Logging
// Check if this is a heartbeat message
if Heartbeat.isHeartbeat(newData) {
logger.debug("Received heartbeat from peer")
logger.trace("Received heartbeat from peer")
// Extract timestamp if available
if let heartbeat = Heartbeat.from(data: newData) {
logger.debug("Heartbeat timestamp: \(heartbeat.timestamp)")
logger.trace("Heartbeat timestamp: \(heartbeat.timestamp)")
}
// Reset the counter since we got valid data
@ -783,7 +783,7 @@ import Logging
} else if let content = content {
continuation.resume(returning: content)
} else if isComplete {
self.logger.debug("Connection completed by peer")
self.logger.trace("Connection completed by peer")
continuation.resume(throwing: MCPError.connectionClosed)
} else {
// EOF: Resume with empty data instead of throwing an error