Skip to content

Gentler logging for socket errors#56

Merged
jmcphers merged 3 commits into
mainfrom
bugfix/kernel-socket-errors
Dec 10, 2025
Merged

Gentler logging for socket errors#56
jmcphers merged 3 commits into
mainfrom
bugfix/kernel-socket-errors

Conversation

@jmcphers
Copy link
Copy Markdown
Contributor

These "errors" can happen in fairly innocuous situations, such as the client not closing the connection when making an HTTP request (just a hygiene thing). Log them at debug, not error, and indicate the socket involved.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR reduces log noise by downgrading connection error logging from error to debug level for Unix socket connections, recognizing that these errors commonly occur during normal client disconnection and are not indicative of actual problems. The socket path is also added to the log message for better diagnostics.

Key Changes

  • Changed Unix socket connection error logging from error to debug level with explanatory comment
  • Added socket path information to the log message for better diagnostics
  • Cloned the socket path before the async block to enable its use in the spawned task

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +400 to +403
// Connection shutdown errors are common and expected when clients
// disconnect - only log at debug level to avoid noise
let socket_info = socket_path.as_deref().unwrap_or("unknown");
log::debug!("Unix socket connection ended ({}): {}", socket_info, e);
Copy link

Copilot AI Dec 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The logging change to debug level for connection errors is only applied to Unix sockets. For consistency, the same change should be applied to the TCP server (line 333) and Windows named pipe server (line 474), as connection shutdown errors are equally common and expected in those contexts when clients disconnect.

Copilot uses AI. Check for mistakes.
@jmcphers jmcphers merged commit 494bdde into main Dec 10, 2025
5 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 10, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants