MCPcopy Index your code
hub / github.com/coder/coder / WithRequestLogger

Function WithRequestLogger

coderd/httpmw/loggermw/logger.go:192–194  ·  view source on GitHub ↗
(ctx context.Context, rl RequestLogger)

Source from the content-addressed store, hash-verified

190type logContextKey struct{}
191
192func WithRequestLogger(ctx context.Context, rl RequestLogger) context.Context {
193 return context.WithValue(ctx, logContextKey{}, rl)
194}
195
196func RequestLoggerFromContext(ctx context.Context) RequestLogger {
197 val := ctx.Value(logContextKey{})

Callers 3

TestAPIKeyFunction · 0.92
LoggerFunction · 0.85

Calls

no outgoing calls

Tested by 2

TestAPIKeyFunction · 0.74