We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
go version
$ go version go version go1.20.3 linux/amd64
Yes
go env
$ go env GO111MODULE="auto" GOARCH="amd64" GOBIN="" GOCACHE="/home/vogtp/.cache/go-build" GOENV="/home/vogtp/.config/go/env" GOEXE="" GOEXPERIMENT="" GOFLAGS="" GOHOSTARCH="amd64" GOHOSTOS="linux" GOINSECURE="" GOMODCACHE="/home/vogtp/go/pkg/mod" GONOPROXY="" GONOSUMDB="" GOOS="linux" GOPATH="/home/vogtp/go/" GOPRIVATE="" GOPROXY="https://proxy.golang.org,direct" GOROOT="/home/vogtp/sdk/go1.20.3" GOSUMDB="sum.golang.org" GOTMPDIR="" GOTOOLDIR="/home/vogtp/sdk/go1.20.3/pkg/tool/linux_amd64" GOVCS="" GOVERSION="go1.20.3" GCCGO="gccgo" GOAMD64="v1" AR="ar" CC="gcc" CXX="g++" CGO_ENABLED="1" GOMOD="/home/vogtp/go/src/github.com/vogtp/slog-tests/go.mod" GOWORK="" CGO_CFLAGS="-O2 -g" CGO_CPPFLAGS="" CGO_CXXFLAGS="-O2 -g" CGO_FFLAGS="-O2 -g" CGO_LDFLAGS="-O2 -g" PKG_CONFIG="pkg-config" GOGCCFLAGS="-fPIC -m64 -pthread -Wl,--no-gc-sections -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build1680678466=/tmp/go-build -gno-record-gcc-switches"
Create a new slog with attributes:
https://go.dev/play/p/G9K0STO5xVT
A "copy" of slog
panic: bad kind: 9
goroutine 1 [running]: golang.org/x/exp/slog.appendJSONValue(0xc00009ae48, {0x4c0ae0?, {0x4c0ae0?, 0x5b59c8?}}) /tmp/gopath3992858384/pkg/mod/golang.org/x/[email protected]/slog/json_handler.go:145 +0x774 golang.org/x/exp/slog.(*handleState).appendValue(0xc00009ae48, {0x4d1da2?, {0x4c0ae0?, 0x5b59c8?}}) /tmp/gopath3992858384/pkg/mod/golang.org/x/[email protected]/slog/handler.go:540 +0x30 golang.org/x/exp/slog.(*handleState).appendAttr(0xc00009ae48, {{0x4d1da2, 0x1}, {0x0, {0x4c0ae0, 0x5b59c8}}}) /tmp/gopath3992858384/pkg/mod/golang.org/x/[email protected]/slog/handler.go:478 +0x6e5 golang.org/x/exp/slog.(*commonHandler).withAttrs(0xc00007a090, {0xc000016120, 0x1, 0x4bb880?}) /tmp/gopath3992858384/pkg/mod/golang.org/x/[email protected]/slog/handler.go:237 +0x4e5 golang.org/x/exp/slog.(*JSONHandler).WithAttrs(0x4c0ae0?, {0xc000016120?, 0xc000094000?, 0x0?}) /tmp/gopath3992858384/pkg/mod/golang.org/x/[email protected]/slog/json_handler.go:54 +0x25 main.main() /tmp/sandbox1421477762/prog.go:11 +0x15f
The text was updated successfully, but these errors were encountered:
golang/exp@be6415c
Change https://go.dev/cl/486795 mentions this issue: slog: backport changes from stdlib
slog: backport changes from stdlib
Sorry, something went wrong.
No branches or pull requests
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Create a new slog with attributes:
https://go.dev/play/p/G9K0STO5xVT
What did you expect to see?
A "copy" of slog
What did you see instead?
panic: bad kind: 9
goroutine 1 [running]:
golang.org/x/exp/slog.appendJSONValue(0xc00009ae48, {0x4c0ae0?, {0x4c0ae0?, 0x5b59c8?}})
/tmp/gopath3992858384/pkg/mod/golang.org/x/[email protected]/slog/json_handler.go:145 +0x774
golang.org/x/exp/slog.(*handleState).appendValue(0xc00009ae48, {0x4d1da2?, {0x4c0ae0?, 0x5b59c8?}})
/tmp/gopath3992858384/pkg/mod/golang.org/x/[email protected]/slog/handler.go:540 +0x30
golang.org/x/exp/slog.(*handleState).appendAttr(0xc00009ae48, {{0x4d1da2, 0x1}, {0x0, {0x4c0ae0, 0x5b59c8}}})
/tmp/gopath3992858384/pkg/mod/golang.org/x/[email protected]/slog/handler.go:478 +0x6e5
golang.org/x/exp/slog.(*commonHandler).withAttrs(0xc00007a090, {0xc000016120, 0x1, 0x4bb880?})
/tmp/gopath3992858384/pkg/mod/golang.org/x/[email protected]/slog/handler.go:237 +0x4e5
golang.org/x/exp/slog.(*JSONHandler).WithAttrs(0x4c0ae0?, {0xc000016120?, 0xc000094000?, 0x0?})
/tmp/gopath3992858384/pkg/mod/golang.org/x/[email protected]/slog/json_handler.go:54 +0x25
main.main()
/tmp/sandbox1421477762/prog.go:11 +0x15f
The text was updated successfully, but these errors were encountered: