MCPcopy Create free account
hub / github.com/dan-v/lambda-nat-proxy / LogConnectionEvent

Function LogConnectionEvent

pkg/shared/logger.go:124–131  ·  view source on GitHub ↗

LogConnectionEvent logs connection-related events

(event string, remote string, attrs ...slog.Attr)

Source from the content-addressed store, hash-verified

122
123// LogConnectionEvent logs connection-related events
124func LogConnectionEvent(event string, remote string, attrs ...slog.Attr) {
125 allAttrs := append([]slog.Attr{
126 slog.String("event", event),
127 slog.String("remote_addr", remote),
128 slog.Time("timestamp", time.Now()),
129 }, attrs...)
130 StructuredInfo("Connection event", allAttrs...)
131}
132
133// LogMetrics logs performance metrics
134func LogMetrics(component string, metrics map[string]interface{}) {

Callers

nothing calls this directly

Calls 1

StructuredInfoFunction · 0.85

Tested by

no test coverage detected