File: log.go

package info (click to toggle)
golang-github-zitadel-oidc 3.44.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,520 kB
  • sloc: makefile: 5
file content (17 lines) | stat: -rw-r--r-- 317 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
package rp

import (
	"context"
	"log/slog"

	"github.com/zitadel/logging"
)

func logCtxWithRPData(ctx context.Context, rp RelyingParty, attrs ...any) context.Context {
	logger, ok := rp.Logger(ctx)
	if !ok {
		return ctx
	}
	logger = logger.With(slog.Group("rp", attrs...))
	return logging.ToContext(ctx, logger)
}