Skip to content

Conversation

@MarcoPolo
Copy link
Collaborator

A small release that adjust some noisy logging levels and adds a method for dynamically change the slog Handler for better integration with applications that use go-log.

@lidel can you confirm this works as expected for IPFS?

A small release that adjust some noisy logging levels and adds a method
for dynamically change the slog Handler for better integration with
applications that use go-log.

◆  [email protected] 3f09fa4 feat(gologshim): Add SetDefaultHandler (#3418)
◆  vsnqmzpw [email protected] 7b78dd6 fix(websocket): use debug level for http.Server errors
lidel added a commit to ipfs/kubo that referenced this pull request Nov 5, 2025
update to go-libp2p v0.45.0 pre-release (3b3b1fd6) and latest go-log (eea1e41)

add documentation for GOLOG_LOG_LABELS and GOLOG_CAPTURE_DEFAULT_SLOG environment variables

see libp2p/go-libp2p#3424
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

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

Yes, good to go 👍

Tested this PR (3b3b1fd) extensively in:

Level control and go-log interop work as expected.

Confirmed ipfs log level and ipfs log tail RPC work in, including extra details being correctly passed from slog→go-log→kubo→rpc→webui:

I released go-log v2.9.0 with golog.SlogHandler() and updated godoc example in go-libp2p (efa486d)

@MarcoPolo feel free to ship 🙏

If possible, Release notes for go-libp2p 0.45 should document the code that go-log+go-libp2p users need to set if they want to restore logs that were broken in go-libp2p 0.44:

  1. update to go-log v2.9.0
  2. update to go-libp2p >= 0.45
  3. manually wire go-log and go-libp2p together:
    import (
        "log/slog"
        golog "github.com/ipfs/go-log/v2"
        "github.com/libp2p/go-libp2p/gologshim"
    )
    
    func init() {
        // Connect go-libp2p to go-log
        gologshim.SetDefaultHandler(golog.SlogHandler())
        
        // Optional: route all slog logs through go-log
        slog.SetDefault(slog.New(golog.SlogHandler()))
    }

update integration example to use golog.SlogHandler() instead of
slog.Default().Handler(). more explicit and works even when
GOLOG_CAPTURE_DEFAULT_SLOG=false.
@github-actions
Copy link

github-actions bot commented Nov 5, 2025

Suggested version: 0.45.0

Comparing to: v0.44.0 (diff)

Changes in configuration file(s):

(empty)

gorelease says:

# diagnostics
go.mod: the following requirements are needed
	github.com/cheekybits/[email protected]
	github.com/containerd/[email protected]
	github.com/coreos/go-systemd/[email protected]
	github.com/docker/[email protected]
	github.com/elastic/[email protected]
	github.com/fsnotify/[email protected]
	github.com/go-task/[email protected]
	github.com/godbus/dbus/[email protected]
	github.com/gogo/[email protected]
	github.com/golang/[email protected]
	github.com/google/[email protected]
	github.com/hashicorp/[email protected]
	github.com/ipfs/go-log/[email protected]
	github.com/libp2p/[email protected]
	github.com/libp2p/[email protected]
	github.com/libp2p/go-yamux/[email protected]
	github.com/lucas-clemente/[email protected]
	github.com/marten-seemann/[email protected]
	github.com/marten-seemann/[email protected]
	github.com/marten-seemann/[email protected]
	github.com/marten-seemann/[email protected]
	github.com/mattn/[email protected]
	github.com/mattn/[email protected]
	github.com/nxadm/[email protected]
	github.com/onsi/[email protected]
	github.com/opencontainers/[email protected]
	github.com/pkg/[email protected]
	github.com/raulk/[email protected]
	github.com/spacemonkeygo/[email protected]
	[email protected]
	gopkg.in/[email protected]
Run 'go mod tidy' to add missing requirements.
required module github.com/microcosm-cc/[email protected] retracted by module author: Retract older versions as only latest is to be depended upon

# summary
Suggested version: v0.44.1

gocompat says:

HEAD is now at bc0a6d52 chore: release v0.44.0
Previous HEAD position was bc0a6d52 chore: release v0.44.0
Switched to branch 'master'
Your branch is up to date with 'origin/master'.

Cutting a Release (and modifying non-markdown files)

This PR is modifying both version.json and non-markdown files.
The Release Checker is not able to analyse files that are not checked in to master. This might cause the above analysis to be inaccurate.
Please consider performing all the code changes in a separate PR before cutting the release.

Automatically created GitHub Release

A draft GitHub Release has been created.
It is going to be published when this PR is merged.
You can modify its' body to include any release notes you wish to include with the release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants