Skip to content

Conversation

@euank
Copy link
Contributor

@euank euank commented Jun 3, 2025

In #203 we removed the public uses of log15, but still had a few references hanging around internally.

None of them seemed overtly difficult to remove, so I went through and cleaned them up.

This was mainly a rote replacement of log15.Logger to *slog.Logger, and log15.Logger.New to slog.Logger.With with only two exceptions:

  1. We had some uses of github.com/inconshreveable/log15/v3/ext.RandID(). These became fmt.Sprintf("%x", rand.Uint64()), which I think gives us something pretty similar overall.
  2. netx.LoggedConn embedded the log15.Logger interface; slog doesn't have an interface, so I manually added the correct Info, Warn, and Error method signatures instead

I also had to clean up the examples go.mod a little before go mod tidy there worked, but I think I got that right.

Overall, I think this is a straightforward refactor

@euank euank requested a review from inconshreveable June 3, 2025 04:11
Copy link
Contributor

@inconshreveable inconshreveable left a comment

Choose a reason for hiding this comment

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

lgtm! ty for paying down some of the debt in the legacy package!

@euank euank merged commit fc1f09d into main Jun 3, 2025
2 checks passed
@euank euank deleted the euan/no-log15 branch June 3, 2025 05:03
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