Skip to content

Releases: veqryn/slog-context

v0.9.0

Choose a tag to compare

@veqryn veqryn released this 28 Jan 08:02
6bc2ac0

What's Changed

Full Changelog: v0.8.0...v0.9.0

v0.8.0

Choose a tag to compare

@veqryn veqryn released this 04 Apr 00:19
d589de3

What's Changed

  • Grpc interceptor slogger: #24
    Golang GRPC Interceptors for SLOG logging, that automatically logs all requests
    and responses, including streaming requests and streaming responses.
    Customizable and compact.

Full Changelog: v0.7.0...v0.8.0

v0.7.0

Choose a tag to compare

@veqryn veqryn released this 01 Apr 07:09
e44c955

What's Changed

  • Http middleware by @veqryn in #21
    sloghttp.ExtractAttrCollection extractor will automatically add to the log
    record any attributes added by sloghttp.With after the sloghttp.AttrCollection
    http middleware. This allows other middlewares to log with attributes that would
    normally be out of scope, because they were added by a later middleware or the
    final http handler in the chain.

Full Changelog: v0.6.0...v0.7.0

v0.6.0

Choose a tag to compare

@veqryn veqryn released this 26 Mar 08:29
c6b21ed

What's Changed

  • Error slog attribute by @veqryn in #19
    slogctx.Err(...)

Full Changelog: v0.5.1...v0.6.0

v0.5.1

Choose a tag to compare

@veqryn veqryn released this 10 Mar 08:33
  • Support for Golang 1.22 (in addition to 1.21)
  • Additional tests
  • Updated docs
  • License updated to MIT

v0.5.0

Choose a tag to compare

@veqryn veqryn released this 03 Jan 08:04

Breaking Changes

Package function ToCtx renamed to NewCtx.
Package function Logger renamed to FromCtx.

Package renamed from slogcontext to slogctx.
To fix, change this:

import "github.com/veqryn/slog-context"
var h = slogcontext.NewHandler(slog.NewJSONHandler(os.Stdout, nil), nil)

To this:

import "github.com/veqryn/slog-context"
var h = slogctx.NewHandler(slog.NewJSONHandler(os.Stdout, nil), nil)

Named imports are unaffected.

v0.4.0

Choose a tag to compare

@veqryn veqryn released this 27 Dec 22:11

Added compatibility with Logr:
slog-context is now compatible with both standard library slog and with logr, which is an alternative logging api/interface/frontend.

If only slog is used, only *slog.Logger's will be stored in the context.
If both slog and logr are used, *slog.Logger will be automatically converted to a logr.Logger as needed, and vice versa. This allows full interoperability up and down the stack and with any libraries that use either slog-context or logr.

v0.3.0

Choose a tag to compare

@veqryn veqryn released this 26 Nov 10:31
0d5ce8f

Added a convenience method that allow the handler to be created as github.com/samber/slog-multi middleware, in order to easily setup slog workflows such as pipeslines, fanout, routing, failover, etc.

v0.2.2

Choose a tag to compare

@veqryn veqryn released this 17 Nov 23:34
ef8b17a

Fixed examples module

v0.2.1

Choose a tag to compare

@veqryn veqryn released this 17 Nov 12:47
675c5bc

Fixed otel go module