jussi-kalliokoski / slogdriver

Stackdriver Logging / GCP Cloud Logging handler for the go 1.21 slog package.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

slogdriver

GoDoc CI status

Stackdriver Logging / GCP Cloud Logging handler for go the 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 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.
  • Minimal dependencies.

About

Stackdriver Logging / GCP Cloud Logging handler for the go 1.21 slog package.

License:ISC License


Languages

Language:Go 100.0%