Package slogc provides Logger, which is an alias for slogx.ContextLogger and is an alternative to slog.Logger that focuses on performance and usability. See the slogx package description for more details about slogx.ContextLogger and its rationale. This package provides logging primitives that are context-centric. The Logger can be stored in a context using the New function, and later used implicitly by providing only the context to a set of functions such as Log, Info, Debug, and so on. It can also be retrieved from the context using the Get method. If the context does not contain a value stored by the New method, a Default logger is returned, which is constructed using a handler returned by slog.Default.
- See benchmark results for details.