Граф коммитов

17 Коммитов

Автор SHA1 Сообщение Дата
cui fliter 4e46ff54a6 all: fix some typos
Change-Id: Id2b7fbb263d08103e17d2dc74454071fb3993586
Reviewed-on: https://go-review.googlesource.com/c/example/+/552396
Run-TryBot: shuang cui <imcusg@gmail.com>
Auto-Submit: Dmitri Shuralyov <dmitshur@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
TryBot-Bypass: Dmitri Shuralyov <dmitshur@golang.org>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@golang.org>
2024-09-06 15:05:55 +00:00
Aleksandr Shalimov 32022caedd slog-handler-guide/README.md: fix word duplication
Change-Id: Id17b4acd73e237813292a63112b30e915d652bd4
GitHub-Last-Rev: 2052832a0d
GitHub-Pull-Request: golang/example#29
Reviewed-on: https://go-review.googlesource.com/c/example/+/550196
Reviewed-by: qiulaidongfeng <2645477756@qq.com>
Run-TryBot: qiulaidongfeng <2645477756@qq.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
Reviewed-by: Jonathan Amsterdam <jba@google.com>
TryBot-Bypass: Jonathan Amsterdam <jba@google.com>
2024-02-05 18:00:59 +00:00
Jonathan Amsterdam d9923f6970 slog-handler-guide: fix link, mention ReplaceAttr
- 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>
2023-09-01 16:54:30 +00:00
Jonathan Amsterdam 9fd7daa707 slog-handler-guide: prose tweak, re-make README
Change-Id: I470379d7ff14e8d3233556d70e499b19736f27a6
Reviewed-on: https://go-review.googlesource.com/c/example/+/515556
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2023-08-10 18:59:35 +00:00
Jonathan Amsterdam a16ef21b42 slog-handler-guide: minor prose tweaks
Change-Id: Ie5299ec0f6e9d1936281152290edf397a0956b90
Reviewed-on: https://go-review.googlesource.com/c/example/+/514055
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2023-08-03 21:41:42 +00:00
Jonathan Amsterdam 344698fc2a slog-handler-guide: speed section
Change-Id: If06f51747e6e4926d95e88840ab5fdce5f9a0189
Reviewed-on: https://go-review.googlesource.com/c/example/+/513457
Reviewed-by: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
2023-08-03 21:41:35 +00:00
Jonathan Amsterdam 6088d5b0e0 slog-handler-guide: discuss Record.Clone
Change-Id: I55c6367da953b9a59c4d5cd8ca817d3c051e12de
Reviewed-on: https://go-review.googlesource.com/c/example/+/513138
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
2023-07-26 19:22:20 +00:00
Jonathan Amsterdam b766721567 slog-handler-guide: add testing section
View at https://github.com/jba/markdown#testing.

Change-Id: I0d8996395b03c3d1c7b7e50cce323a331fd614e1
Reviewed-on: https://go-review.googlesource.com/c/example/+/513137
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
2023-07-26 19:22:15 +00:00
Jonathan Amsterdam 4228a155ff slog-handler-guide: explain pointer to mutex
Change-Id: Icfca54f04ff1fcc2c2b36cb0ccde1efd49e034f4
Reviewed-on: https://go-review.googlesource.com/c/example/+/512999
Reviewed-by: Ian Cottrell <iancottrell@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2023-07-26 19:22:07 +00:00
Jonathan Amsterdam 94c9d89053 slog-handler-guide: preformatting
Change-Id: Ib1e64bafc76c296aa0ffb40d754d6e41fe69a33e
Reviewed-on: https://go-review.googlesource.com/c/example/+/511638
Run-TryBot: Jonathan Amsterdam <jba@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2023-07-26 18:35:42 +00:00
Jonathan Amsterdam 183ca08161 slog-handler-guide: WithXXX methods without pre-formatting
Change-Id: Ia95d8ddd50eb72bef057768d88b216d7b9809c58
Reviewed-on: https://go-review.googlesource.com/c/example/+/511576
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2023-07-26 00:05:23 +00:00
Jonathan Amsterdam f15fe1c962 slog-handler-guide: handler example: Enabled method
Change-Id: I193980beda71ab8e20ccdd8a4eb0d72a9d2b32a0
Reviewed-on: https://go-review.googlesource.com/c/example/+/509956
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
2023-07-25 23:37:31 +00:00
Jonathan Amsterdam f37d043b20 slog-handler-guide: appendAttrs method
Change-Id: Ib2ba817b456ceb8c8b697d3ee24ba6c2884c942b
Reviewed-on: https://go-review.googlesource.com/c/example/+/511635
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Ian Cottrell <iancottrell@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2023-07-25 23:36:40 +00:00
Jonathan Amsterdam 29ffb748dd slog-handler-guide: handler example: Handle method
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>
2023-07-25 23:35:54 +00:00
Jonathan Amsterdam 7137c6b752 slog-handler-guide: handler example: types
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>
2023-07-25 23:35:29 +00:00
Jonathan Amsterdam 72e55f1f1d slog-handler-guide: guide to writing a slog Handler
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>
2023-07-25 21:09:10 +00:00
Jonathan Amsterdam 83a29069fa slog-handler-guide/README.md: stub
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>
2023-07-14 14:12:44 +00:00