Преглед изворни кода

feature: Add actionTitle to blocked log messages (#179)

James Read пре 2 година
родитељ
комит
5739091773
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3 1
      internal/executor/executor.go

+ 3 - 1
internal/executor/executor.go

@@ -167,7 +167,9 @@ func stepConcurrencyCheck(req *ExecutionRequest) bool {
 	if concurrentCount >= (req.action.MaxConcurrent + 1) {
 		msg := fmt.Sprintf("Blocked from executing. This would mean this action is running %d times concurrently, but this action has maxExecutions set to %d.", concurrentCount, req.action.MaxConcurrent)
 
-		log.Warnf(msg)
+		log.WithFields(log.Fields{
+			"actionTitle": req.ActionName,
+		}).Warnf(msg)
 
 		req.logEntry.Stdout = msg
 		req.logEntry.Blocked = true