CARVIEW |
Navigation Menu
-
Notifications
You must be signed in to change notification settings - Fork 5
Releases: veqryn/slog-context
v0.8.0
d589de3
Compare
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
Assets 2
v0.7.0
e44c955
Compare
What's Changed
- Http middleware by @veqryn in #21
sloghttp.ExtractAttrCollection
extractor will automatically add to the log
record any attributes added bysloghttp.With
after thesloghttp.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
Assets 2
v0.6.0
c6b21ed
Compare
What's Changed
Full Changelog: v0.5.1...v0.6.0
Assets 2
v0.5.1
Compare
- Support for Golang 1.22 (in addition to 1.21)
- Additional tests
- Updated docs
- License updated to MIT
Assets 2
v0.5.0
Compare
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.
Assets 2
v0.4.0
Compare
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.
Assets 2
v0.3.0
Compare
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.