https://github.com/phsym/slogctx
https://github.com/phsym/slogctx
Last synced: over 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/phsym/slogctx
- Owner: phsym
- License: mit
- Created: 2023-09-24T09:41:56.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-01-16T16:11:10.000Z (over 1 year ago)
- Last Synced: 2025-01-30T07:22:13.102Z (over 1 year ago)
- Language: Go
- Size: 82 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# slogctx
[](https://pkg.go.dev/github.com/phsym/slogctx) [](https://raw.githubusercontent.com/phsym/slogctx/master/LICENSE) [](https://github.com/phsym/slogctx/actions/workflows/go.yml) [](https://codecov.io/gh/phsym/slogctx) [](https://goreportcard.com/report/github.com/phsym/slogctx)
> WORK IN PROGRESS
## Installation
```bash
go get github.com/phsym/slogctx@latest
```
## Example
```go
package main
import (
"errors"
"log/slog"
"os"
"github.com/phsym/slogctx"
)
func main() {
logger := slog.New(
console.NewHandler(os.Stderr, &console.HandlerOptions{Level: slog.LevelDebug}),
)
slog.SetDefault(logger)
// TBD ...
}
```
## Performances
See [benchmark file](./bench_test.go) for details.
TBD ...