You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I did not pursue it further because it won't work with current LogSink implementations. If we expect implementations to be modified, wouldn't it be better to support slog directly?
The alternative is an interface that is specific to slog:
// SlogSink is an interface that a LogSink can implement to support logging
// through the slog.Logger or slog.Handler APIs better. It then should
// also support special slog values like slog.Group.
type SlogSink interface {
logr.LogSink
Handle(ctx context.Context, record slog.Record) error
WithAttrs(attrs []slog.Attr) SlogSink
WithGroup(name string) SlogSink
}
This would make bridging from slog a bit cleaner, rather than handlers doing their own unwinding.
The text was updated successfully, but these errors were encountered: