LogProgress logs a progress/activity message with emoji prefix
(operation string, details ...interface{})
| 84 | |
| 85 | // LogProgress logs a progress/activity message with emoji prefix |
| 86 | func 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 |
| 105 | func LogProgressf(format string, args ...interface{}) { |
nothing calls this directly
no test coverage detected