Skip to content

Conversation

hsanjuan
Copy link
Contributor

Moved some error logging to warn level.

The errors are useful when figuring out why something is not loading from somewhere (particularly in an scenario where an allowlist is configured), but in an all-open setup they will spam the logs. Default log level is error I think, so warn messages should not show and can be activated without getting into the debug details.

Fixes #955.
Fixes #954.

Moved some error logging to warn level.

The errors are useful when figuring out why something is not loading from
somewhere (particularly in an scenario where an allowlist is configured), but
in an all-open setup they will spam the logs. Default log level is error I
think, so warn messages should not show and can be activated without getting
into the debug details.

Fixes #955.
Fixes #954.
@hsanjuan hsanjuan requested a review from a team as a code owner June 20, 2025 08:53
@hsanjuan hsanjuan self-assigned this Jun 20, 2025
@hsanjuan hsanjuan requested a review from lidel June 20, 2025 08:54
Copy link

codecov bot commented Jun 20, 2025

Codecov Report

Attention: Patch coverage is 25.00000% with 3 lines in your changes missing coverage. Please review.

Project coverage is 61.59%. Comparing base (af57197) to head (b3a3c07).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
bitswap/network/httpnet/msg_sender.go 33.33% 2 Missing ⚠️
bitswap/network/httpnet/httpnet.go 0.00% 1 Missing ⚠️

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #958   +/-   ##
=======================================
  Coverage   61.59%   61.59%           
=======================================
  Files         254      254           
  Lines       31401    31400    -1     
=======================================
  Hits        19341    19341           
+ Misses      10487    10486    -1     
  Partials     1573     1573           
Files with missing lines Coverage Δ
bitswap/network/httpnet/httpnet.go 67.29% <0.00%> (+0.14%) ⬆️
bitswap/network/httpnet/msg_sender.go 62.32% <33.33%> (ø)

... and 4 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@lidel lidel mentioned this pull request Jun 23, 2025
46 tasks
@@ -522,7 +522,7 @@ WANTLIST_LOOP:
// error handling
switch result.err.Type {
case typeFatal:
log.Errorf("fatal error. Disconnecting from %s: %s", sender.peer, result.err.Err)
log.Warnf("disconnecting from %s: %s", sender.peer, result.err.Err)
Copy link
Member

Choose a reason for hiding this comment

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

💭 warning is fine for Kubo (default is error) but if folks run their boxes with info i have a gut feeling this may still get annoying once we have a lot of HTTP providers

but we will re-evaluate once Kubo 0.36 ships

@lidel lidel merged commit 6d9782e into main Jun 23, 2025
16 of 17 checks passed
@lidel lidel deleted the fix/955-954-logging branch June 23, 2025 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

httpnet: logs every HTTP 5XX as ERROR httpnet: move disconnect spam to DEBUG level
2 participants