@@ -13,7 +13,7 @@ This document is maintained by Jonathan Amsterdam `jba@google.com`.
1313
1414The standard library’s ` log/slog ` package has a two-part design.
1515A "frontend," implemented by the ` Logger ` type,
16- gathers stuctured log information like a message, level, and attributes,
16+ gathers structured log information like a message, level, and attributes,
1717and passes them to a "backend," an implementation of the ` Handler ` interface.
1818The package comes with two built-in handlers that usually should be adequate.
1919But you may need to write your own handler, and that is not always straightforward.
@@ -76,7 +76,7 @@ A logger's `WithGroup` method calls its handler's `WithGroup` method.
7676
7777We can now talk about the four ` Handler ` methods in detail.
7878Along the way, we will write a handler that formats logs using a format
79- reminsicent of YAML. It will display this log output call:
79+ reminiscent of YAML. It will display this log output call:
8080
8181 logger.Info("hello", "key", 23)
8282
@@ -100,7 +100,7 @@ and the `New` function that constructs it from an `io.Writer` and options:
100100%include indenthandler1/indent_handler.go types -
101101
102102We'll support only one option, the ability to set a minimum level in order to
103- supress detailed log output.
103+ suppress detailed log output.
104104Handlers should always declare this option to be a ` slog.Leveler ` .
105105The ` slog.Leveler ` interface is implemented by both ` Level ` and ` LevelVar ` .
106106A ` Level ` value is easy for the user to provide,
@@ -557,7 +557,7 @@ Beware of facile claims like "Unix writes are atomic"; the situation is a lot mo
557557Some handlers have legitimate reasons for keeping state.
558558For example, a handler might support a ` SetLevel ` method to change its configured level
559559dynamically.
560- Or it might output the time between sucessive calls to ` Handle ` ,
560+ Or it might output the time between successive calls to ` Handle ` ,
561561which requires a mutable field holding the last output time.
562562Synchronize all accesses to such fields, both reads and writes.
563563
0 commit comments