diff options
author | Jonathan Amsterdam <jba@google.com> | 2023-04-19 14:24:33 -0400 |
---|---|---|
committer | Jonathan Amsterdam <jba@google.com> | 2023-05-04 18:32:54 +0000 |
commit | a82f69f60e976d1a99c477903f5de98839c24f70 (patch) | |
tree | 3486f77181c2f28d3cb5e0d183c5ccb1846bf4fb /api | |
parent | 5c51e9f45b0a7a13e5dd3bd6487f67d2bbdb5346 (diff) | |
download | go-git-a82f69f60e976d1a99c477903f5de98839c24f70.tar.gz |
log/slog: built-in handler constructors take options as a second arg
There is now one constructor function for each built-in handler, with
signature
NewXXXHandler(io.Writer, *HandlerOptions) *XXXHandler
Fixes #59339.
Change-Id: Ia02183c5ce0dc15c64e33ad05fd69bca09df2d2d
Reviewed-on: https://go-review.googlesource.com/c/go/+/486415
Reviewed-by: Alan Donovan <adonovan@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Diffstat (limited to 'api')
-rw-r--r-- | api/next/56345.txt | 4 | ||||
-rw-r--r-- | api/next/59339.txt | 2 |
2 files changed, 2 insertions, 4 deletions
diff --git a/api/next/56345.txt b/api/next/56345.txt index fd3893e81d..c11ce6871e 100644 --- a/api/next/56345.txt +++ b/api/next/56345.txt @@ -58,10 +58,8 @@ pkg log/slog, func IntValue(int) Value #56345 pkg log/slog, func Log(context.Context, Level, string, ...interface{}) #56345 pkg log/slog, func LogAttrs(context.Context, Level, string, ...Attr) #56345 pkg log/slog, func New(Handler) *Logger #56345 -pkg log/slog, func NewJSONHandler(io.Writer) *JSONHandler #56345 pkg log/slog, func NewLogLogger(Handler, Level) *log.Logger #56345 pkg log/slog, func NewRecord(time.Time, Level, string, uintptr) Record #56345 -pkg log/slog, func NewTextHandler(io.Writer) *TextHandler #56345 pkg log/slog, func SetDefault(*Logger) #56345 pkg log/slog, func String(string, string) Attr #56345 pkg log/slog, func StringValue(string) Value #56345 @@ -105,8 +103,6 @@ pkg log/slog, method (*TextHandler) WithAttrs([]Attr) Handler #56345 pkg log/slog, method (*TextHandler) WithGroup(string) Handler #56345 pkg log/slog, method (Attr) Equal(Attr) bool #56345 pkg log/slog, method (Attr) String() string #56345 -pkg log/slog, method (HandlerOptions) NewJSONHandler(io.Writer) *JSONHandler #56345 -pkg log/slog, method (HandlerOptions) NewTextHandler(io.Writer) *TextHandler #56345 pkg log/slog, method (Kind) String() string #56345 pkg log/slog, method (Level) Level() Level #56345 pkg log/slog, method (Level) MarshalJSON() ([]uint8, error) #56345 diff --git a/api/next/59339.txt b/api/next/59339.txt new file mode 100644 index 0000000000..79156e98b6 --- /dev/null +++ b/api/next/59339.txt @@ -0,0 +1,2 @@ +pkg log/slog, func NewJSONHandler(io.Writer, *HandlerOptions) *JSONHandler #59339 +pkg log/slog, func NewTextHandler(io.Writer, *HandlerOptions) *TextHandler #59339 |