fix(websocket): use debug level for operational noise errors#3413
Merged
fix(websocket): use debug level for operational noise errors#3413
Conversation
#3364 migrated from zap to slog but accidentally changed the log level for http.Server.ErrorLog from implicit INFO to explicit ERROR. This caused client EOF and TLS handshake errors to spam error logs and stdout in apps which log only ERROR by default. These http.Server errors (client EOFs, TLS handshake failures from clients with naive TLS implementations, connection timeouts from clients that abort early) are normal operational noise, not actual server errors. Using LevelDebug: - matches semantic meaning (similar to existing connection timeout logs) - respects user's configured threshold (default ERROR filters them out) - allows users to enable for debugging via log level configuration Fixes ipfs/kubo#11027 Fixes ipfs/kubo#11033
MarcoPolo
approved these changes
Oct 28, 2025
Collaborator
MarcoPolo
left a comment
There was a problem hiding this comment.
Sorry for the noise!
We can ship a patch release with this
Member
Author
|
@MarcoPolo thank you i'll try to review #3419 today/tomorrow and we likely want to wait for a release with both. |
This was referenced Nov 8, 2025
lidel
added a commit
that referenced
this pull request
Nov 11, 2025
Pre-v0.44 (Working State): PR #2915 deliberately downgraded all pion logs to Debug level because "Pion logs are too noisy and have invalid log levels". This worked correctly for ~1 year without issues. v0.44.0 (Regression): PR #3364 migrated from go-log/v2 to log/slog but accidentally reverted the pion log level downgrade. The migration kept the comment claiming logs were downgraded but changed the implementation to log Error/Warn/Info at their face values, causing routine connection events to spam error logs. Similar to PR #3413 which fixed this issue for websocket transport, WebRTC transport needs the same treatment. Pion logs client disconnects, protocol mismatches, and state races as ERROR/WARN, but these are normal operational noise from a service perspective, not actual errors requiring operator attention. This restores PR #2915 behavior: downgrade all pion logs to Debug level. Fixes ipfs/kubo#11053
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@MarcoPolo this seems to be a regression in 0.44. FYSA this is blocking Kubo 0.39, any chance we could have a patch with this or maybe 0.45 is soon enough (week-two?)
Log refactor done in
migrated from zap to slog but accidentally changed the log level for
http.Server.ErrorLogfrom implicit INFO to explicit ERROR. This caused client EOF and TLS handshake errors to spam error logs and stdout in apps which log only ERROR by default.These
http.Servererrors (client EOFs, TLS handshake failures from clients with naive TLS implementations, connection timeouts from clients that abort early) are normal operational noise, not actual server errors.Rationale for using
LevelDebug:This PR helps with noise reported in: