Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jussi-kalliokoski/slogdriver
Stackdriver Logging / GCP Cloud Logging handler for the go 1.21 slog package.
https://github.com/jussi-kalliokoski/slogdriver
Last synced: 3 months ago
JSON representation
Stackdriver Logging / GCP Cloud Logging handler for the go 1.21 slog package.
- Host: GitHub
- URL: https://github.com/jussi-kalliokoski/slogdriver
- Owner: jussi-kalliokoski
- License: isc
- Created: 2023-07-03T19:17:56.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-06-05T14:18:27.000Z (8 months ago)
- Last Synced: 2024-08-05T10:11:23.145Z (6 months ago)
- Language: Go
- Size: 20.5 KB
- Stars: 9
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
- awesome-slog - slogdriver
README
# slogdriver
[![GoDoc](https://godoc.org/github.com/jussi-kalliokoski/slogdriver?status.svg)](https://godoc.org/github.com/jussi-kalliokoski/slogdriver)
[![CI status](https://github.com/jussi-kalliokoski/slogdriver/workflows/CI/badge.svg)](https://github.com/jussi-kalliokoski/slogdriver/actions)Stackdriver Logging / GCP Cloud Logging handler for go the [slog](https://pkg.go.dev/log/slog) package for structured logging introduced in the standard library of go 1.21.
NOTE: slogdriver requires go 1.21.
## Design Goals
- Improved performance compared to using the `JSONHandler` with `ReplaceAttr` to achieve the same purpose. This is achieved by using [goldjson](https://github.com/jussi-kalliokoski/goldjson) under the hood.
- Batteries included, e.g. builtin support for labels and traces. The trace information still needs to be provided separately as the library is agnostic as to which telemetry libraries (or versions) you choose to use. It is still highly advised to use [OpenTelemetry](https://opentelemetry.io/docs/instrumentation/go/).
- Minimal dependencies.