slog: remove attempted subheading markers go/doc/comment does not recognize subheadings. Remove the "##" prefix from such headings. As suggested in https://go.dev/doc/comment, end each subheading line with a period to defeat gofmt's attempt to prefix those lines with a "#". Change-Id: Idfd4328d6a8a6441838990175d2dbb0da2fa2bf7 Reviewed-on: https://go-review.googlesource.com/c/exp/+/476199 TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Jonathan Amsterdam <jba@google.com> Reviewed-by: Alan Donovan <adonovan@google.com>
diff --git a/slog/doc.go b/slog/doc.go index 40430cc..7b9133f 100644 --- a/slog/doc.go +++ b/slog/doc.go
@@ -214,7 +214,7 @@ # Advanced topics -## Customizing a type's logging behavior +Customizing a type's logging behavior. If a type implements the [LogValuer] interface, the [Value] returned from its LogValue method is used for logging. You can use this to control how values of the type @@ -226,7 +226,7 @@ method handles these cases carefully, avoiding infinite loops and unbounded recursion. Handler authors and others may wish to use Value.Resolve instead of calling LogValue directly. -## Wrapping output methods +Wrapping output methods. The logger functions use reflection over the call stack to find the file name and line number of the logging call within the application. This can produce @@ -248,7 +248,7 @@ The Infof function in the package-level example called "wrapping" demonstrates how to do this. -## Working with Records +Working with Records. Sometimes a Handler will need to modify a Record before passing it on to another Handler or backend. @@ -262,7 +262,7 @@ or create a new Record with [NewRecord] and build up its Attrs by traversing the old ones with [Record.Attrs]. -## Performance considerations +Performance considerations. If profiling your application demonstrates that logging is taking significant time, the following suggestions may help.