weaver icon indicating copy to clipboard operation
weaver copied to clipboard

switch logger to golang.org/x/exp/slog

Open komuw opened this issue 2 years ago • 0 comments

Currently weaver is using a custom logger; https://github.com/ServiceWeaver/weaver/blob/main/logger.go, https://github.com/ServiceWeaver/weaver/tree/main/runtime/logging

There's a proposal to bring structured logging to the Go standard library. That proposal looks likely to be accepted; It was marked as;

Based on the discussion above, this proposal seems like a likely accept.
— rsc for the proposal review group

2days ago: https://github.com/golang/go/issues/56345#issuecomment-1450760728

An implementation of that proposal already exists at; https://pkg.go.dev/golang.org/x/exp/slog

Since weaver is just starting, I think it should switch to golang.org/x/exp/slog early on. It does not have to do so right away, we can wait a few more days to see if the exp/slog proposal is accepted upstream

komuw avatar Mar 04 '23 09:03 komuw