File tree Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Expand file tree Collapse file tree 3 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 5
5
require (
6
6
github.com/stretchr/testify v1.8.1
7
7
go.uber.org/zap v1.24.0
8
- golang.org/x/exp v0.0.0-20230315142452-642cacee5cc0
8
+ golang.org/x/exp v0.0.0-20230425010034-47ecfdc1ba53
9
9
)
10
10
11
11
require (
Original file line number Diff line number Diff line change @@ -19,8 +19,8 @@ go.uber.org/multierr v1.10.0 h1:S0h4aNzvfcFsC3dRF1jLoaov7oRaKqRGC/pUEJ2yvPQ=
19
19
go.uber.org/multierr v1.10.0 /go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y =
20
20
go.uber.org/zap v1.24.0 h1:FiJd5l1UOLj0wCgbSE0rwwXHzEdAZS6hiiSnxJN/D60 =
21
21
go.uber.org/zap v1.24.0 /go.mod h1:2kMP+WWQ8aoFoedH3T2sq6iJ2yDWpHbP0f6MQbS9Gkg =
22
- golang.org/x/exp v0.0.0-20230315142452-642cacee5cc0 h1:pVgRXcIictcr+lBQIFeiwuwtDIs4eL21OuM9nyAADmo =
23
- golang.org/x/exp v0.0.0-20230315142452-642cacee5cc0 /go.mod h1:CxIveKay+FTh1D0yPZemJVgC/95VzuuOLq5Qi4xnoYc =
22
+ golang.org/x/exp v0.0.0-20230425010034-47ecfdc1ba53 h1:5llv2sWeaMSnA3w2kS57ouQQ4pudlXrR0dCgw51QK9o =
23
+ golang.org/x/exp v0.0.0-20230425010034-47ecfdc1ba53 /go.mod h1:V1LtkGg67GoY2N1AnLN78QLrzxkLyJw7RJb1gzOOz9w =
24
24
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 h1:yhCVgyC4o1eVCa2tZl7eS0r+SDo693bJlVdllGtEeKM =
25
25
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 /go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0 =
26
26
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c /go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM =
Original file line number Diff line number Diff line change @@ -158,8 +158,9 @@ func (h *Handler) Handle(ctx context.Context, record slog.Record) error {
158
158
}
159
159
160
160
fields := make ([]zapcore.Field , 0 , record .NumAttrs ())
161
- record .Attrs (func (attr slog.Attr ) {
161
+ record .Attrs (func (attr slog.Attr ) bool {
162
162
fields = append (fields , convertAttrToField (attr ))
163
+ return true
163
164
})
164
165
ce .Write (fields ... )
165
166
return nil
You can’t perform that action at this time.
0 commit comments