- Fix a broken link.
- When discussing handler options, mention ReplaceAttr.
This were both suggested by Peter Aronoff (peteraronoff@fastmail.com)
in a direct email.
Change-Id: I286142a1c5736691e32042e383f9a98e78f0fb49
Reviewed-on: https://go-review.googlesource.com/c/example/+/524758
Commit-Queue: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>
TryBot-Bypass: Jonathan Amsterdam <jba@google.com>
Pull the discussion of the Handle method up.
It makes more sense to talk about it before WithGroup and WithAttrs.
Change-Id: I01a1b4b98131079cf74d2d965742a48acf5c3407
Reviewed-on: https://go-review.googlesource.com/c/example/+/509957
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Begin discussing a running example of a slog.Handler implementation.
Initially we'll ignore the WithAttrs and WithGroup methods.
The implementation that does that is in indenthandler1.
This CL contains the complete implementation, but discusses
only the types and constructor function.
Change-Id: I3b635aee66a6d5df64bc13ce6bfb7ae4881606fe
Reviewed-on: https://go-review.googlesource.com/c/example/+/509955
Reviewed-by: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Add a document for helping writers of slog handlers.
Change-Id: I079b738d1109a5e1d555c5dfb81eabf1d187f907
Reviewed-on: https://go-review.googlesource.com/c/example/+/494576
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
Add a file that will ultimately contain a guide to writing slog handlers.
This CL just creates the file so we can make a shortlink to it.
Change-Id: Ic31e62c6d92a480ecb7ba03cf052ca375f5abb94
Reviewed-on: https://go-review.googlesource.com/c/example/+/509735
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Alan Donovan <adonovan@google.com>