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

Function LogProgress

pkg/shared/errors.go:86–102  ·  view source on GitHub ↗

LogProgress logs a progress/activity message with emoji prefix

(operation string, details ...interface{})

Source from the content-addressed store, hash-verified

84
85// LogProgress logs a progress/activity message with emoji prefix
86func LogProgress(operation string, details ...interface{}) {
87 var msg string
88 attrs := []slog.Attr{
89 slog.String("operation", operation),
90 slog.Time("timestamp", time.Now()),
91 }
92
93 if len(details) > 0 {
94 detailStr := fmt.Sprint(details...)
95 msg = fmt.Sprintf("🔄 %s: %v", operation, detailStr)
96 attrs = append(attrs, slog.String("details", detailStr))
97 } else {
98 msg = fmt.Sprintf("🔄 %s", operation)
99 }
100
101 GetLogger().LogAttrs(context.Background(), slog.LevelInfo, msg, attrs...)
102}
103
104// LogProgressf logs a formatted progress message with emoji prefix
105func LogProgressf(format string, args ...interface{}) {

Callers

nothing calls this directly

Calls 1

GetLoggerFunction · 0.85

Tested by

no test coverage detected