Skip to content

Commit

Permalink
- Added more descriptive description to slog.
Browse files Browse the repository at this point in the history
- Moved some of the description to a Features section.
  • Loading branch information
shelleeboo committed Oct 21, 2024
1 parent c1365e4 commit 0891d4f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@

## Description

A collection of `slog` extensions.
The `slogx` package is a collection of `slog` extensions. The [`slog`](https://pkg.go.dev/log/slog) is a Go standard library package for a structured logger.

## Features
The `slogx` package provides the following features:
* `ContextHandler` allows you to add `slog` attributes (`slog.Attr` instances) to a `context.Context`. These attributes are added to log records when the `*Context` function variants (`InfoContext`, `ErrorContext`, etc) on the logger are used.
* `LoggerBuilder` provides a simple way to build `slog.Logger` instances.
* `LevelManager` provides a way to manage `slog.LevelVar` instances from environment variables.
Expand Down

0 comments on commit 0891d4f

Please sign in to comment.