[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.

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

2023-07-22 Thread cpu...@gmail.com
Seems it's not possible to create a logger using the log.Logger format in a straight-forward way? On Thursday, July 20, 2023 at 3:48:49 PM UTC+2 cpu...@gmail.com wrote: > The log/slog logger uses the log.Logger format by default. Implementation > is internal. > > In a gradual switch to slog