Re: [go-nuts] What happened to sep in errorrs.join

2023-08-08 Thread 'Jonathan Amsterdam' via golang-nuts
I think you can do what you want with `HandlerOptions.ReplaceAttr`. It is given every attribute, even the message. It can't change the group names, though, and those can have newlines. On Tuesday, August 8, 2023 at 5:47:38 PM UTC-4 Ian Lance Taylor wrote: > [ + jba ] > > On Tue, Aug 8, 2023 at

Re: [go-nuts] Re: Types like http.Request and slog.LogValuer

2023-07-30 Thread 'Jonathan Amsterdam' via golang-nuts
Another idea: write a handler that wraps whatever handler you usually use. That handler looks through the Record for attr values of type *http.Request, and replaces them with whatever formatting you want. You might even be able to do that with a ReplaceAttr function with the built-in handlers. On

[go-nuts] Re: Using log/slog with log.Logger format?

2023-07-29 Thread 'Jonathan Amsterdam' via golang-nuts
We don't plan on exposing the commonLogger implementation, but you can write your own handler to get the exact format you want. See github.com/jba/slog/handlers for some existing code. See https://github.com/golang/example/tree/master/slog-handler-guide for a guide to writing a slog handler. On

[go-nuts] Re: Types like http.Request and slog.LogValuer

2023-07-29 Thread 'Jonathan Amsterdam' via golang-nuts
I would write a type that wraps the request and implements LogValuer. Then you would log the request as logger.Debug("req", "r", requestWrapper{r}) On Thursday, July 27, 2023 at 10:01:27 AM UTC-4 Jens-Uwe Mager wrote: > I am trying to convert some older code to slog and I am running into t

[go-nuts] call for data on HTTP routing

2023-06-01 Thread 'Jonathan Amsterdam' via golang-nuts
At https://github.com/golang/go/discussions/60227, we're discussing enhancements to the standard library's http.ServeMux routing. Two issues have arisen that we could use your help on. The first is easy to state: does fast routing matter? Are there Go web servers for which http.ServeMux is too

[go-nuts] structured, leveled logging

2022-08-31 Thread 'Jonathan Amsterdam' via golang-nuts
If you're interested in logging, you may want to check out the discussion about a potential new standard library package for structured logging. https://github.com/golang/go/discussions/54763 -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To

Re: [go-nuts] godoc.org pkg.go.dev banner feedback

2020-07-06 Thread 'Jonathan Amsterdam' via golang-nuts
Fixed in production. The links work now. On Monday, July 6, 2020 at 12:47:34 PM UTC-4 Julie Qiu wrote: > Thanks for letting us know! This looks like a bug - we'll look into it. I > filed an issue here: https://github.com/golang/go/issues/40071 > > > On Thursday, July 2, 2020 at 12:00:57 PM UTC-4

[go-nuts] using GitHub Pages for import paths

2017-05-08 Thread 'Jonathan Amsterdam' via golang-nuts
What do you all think about using GitHub Pages URLs for import paths? I got to thinking about that because Go is moving towards having real dependency management, and it looks like the repo is going to be the unit of versioning. That implies that repo boundaries are going to be changing a lot in t

[go-nuts] [ANN] upcoming changes for cloud (not appengine) clients

2016-07-28 Thread 'Jonathan Amsterdam' via golang-nuts
If you use a package whose import path starts with "google.golang.org/cloud", please see the important announcement at google-api-go-announce . -- You received this message because you are subscribed to the Google Groups "golang-nut

[go-nuts] [ANN] new mailing list for Google APIs with Go

2016-07-01 Thread 'Jonathan Amsterdam' via golang-nuts
If you use Go to access Google APIs (for example, by using the Google Cloud API clients at import paths starting with "google.golang.org/cloud"), we recommend you join the new group google-api-go-announce . We at Google will use that l