https://github.com/karpeleslab/klbslog
golang slog handler for klb infrastructure
https://github.com/karpeleslab/klbslog
Last synced: 12 months ago
JSON representation
golang slog handler for klb infrastructure
- Host: GitHub
- URL: https://github.com/karpeleslab/klbslog
- Owner: KarpelesLab
- License: mit
- Created: 2023-11-13T12:12:48.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-06-28T14:40:57.000Z (almost 2 years ago)
- Last Synced: 2024-08-21T10:14:37.836Z (almost 2 years ago)
- Language: Go
- Size: 21.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# klbslog
generic slog handler for klb using rest & fleet
Usage:
```go
slog.SetDefault(slog.New(klbslog.New(nil, nil)))
```
Or with options and a parent:
```go
slog.SetDefault(slog.New(klbslog.New(&slog.HandlerOptions{AddSource: true, Level: slog.LevelDebug}, slog.NewTextHandler(os.Stderr, nil))))
```