MCPcopy Index your code
hub / github.com/aws/aws-lambda-go / Handle

Method Handle

lambdacontext/logger.go:109–120  ·  view source on GitHub ↗

Handle implements slog.Handler.

(ctx context.Context, r slog.Record)

Source from the content-addressed store, hash-verified

107
108// Handle implements slog.Handler.
109func (h *lambdaHandler) Handle(ctx context.Context, r slog.Record) error {
110 if lc, ok := FromContext(ctx); ok {
111 r.AddAttrs(slog.String("requestId", lc.AwsRequestID))
112
113 for _, field := range h.fields {
114 if v := field.value(lc); v != "" {
115 r.AddAttrs(slog.String(field.key, v))
116 }
117 }
118 }
119 return h.handler.Handle(ctx, r)
120}
121
122// WithAttrs implements slog.Handler.
123func (h *lambdaHandler) WithAttrs(attrs []slog.Attr) slog.Handler {

Callers

nothing calls this directly

Calls 2

FromContextFunction · 0.70
StringMethod · 0.45

Tested by

no test coverage detected