Documentation ¶
Overview ¶
Package slogbuf implements a Buffer that stores log records that can later be replayed on a slog.Handler. This is particularly useful for bootstrap.
Example: let's say log configuration is stored in an external config source, but the config load mechanism itself wants a logger. A slogbuf "boot logger" can be passed to the config load mechanism. On successful boot, the "real" logger can be created, and slogbuf's records can be replayed on that logger. If boot fails, slogbuf's records can be replayed to stderr.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.