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

Function LogError

pkg/shared/errors.go:11–18  ·  view source on GitHub ↗

LogError logs an error with consistent formatting and emoji prefix

(operation string, err error)

Source from the content-addressed store, hash-verified

9
10// LogError logs an error with consistent formatting and emoji prefix
11func LogError(operation string, err error) {
12 msg := fmt.Sprintf("❌ %s: %v", operation, err)
13 GetLogger().Error(msg,
14 slog.String("operation", operation),
15 slog.String("error", err.Error()),
16 slog.Time("timestamp", time.Now()),
17 )
18}
19
20// LogErrorf logs a formatted error message with emoji prefix
21func LogErrorf(format string, args ...interface{}) {

Callers 8

getS3ClientFunction · 0.92
handleHolePunchRequestFunction · 0.92
startQUICClientFunction · 0.92
handleQUICConnectionFunction · 0.92
handleControlStreamFunction · 0.92
handleSOCKS5StreamFunction · 0.92
shutdownMethod · 0.92
GenerateSessionIDFunction · 0.85

Calls 2

GetLoggerFunction · 0.85
ErrorMethod · 0.80

Tested by

no test coverage detected