Skip to content

Commit

Permalink
Add project logging field awith success message. (#55)
Browse files Browse the repository at this point in the history
  • Loading branch information
nishkrishnan authored and msarvar committed Sep 27, 2021
1 parent b64f42f commit e2104f0
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions server/events/instrumented_project_command_runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ func RunAndEmitStats(commandName string, ctx models.ProjectCommandContext, execu
ctx.SetScope("project")

scope := ctx.Scope
ctx.Log = ctx.Log.WithHistory("project", ctx.ProjectName)
logger := ctx.Log

executionTime := scope.NewTimer(metrics.ExecutionTimeMetric).AllocateSpan()
Expand All @@ -50,6 +51,8 @@ func RunAndEmitStats(commandName string, ctx models.ProjectCommandContext, execu
return result
}

logger.Info("%s success. output available at: %s", commandName, ctx.Pull.URL)

executionSuccess.Inc()
return result

Expand Down

0 comments on commit e2104f0

Please sign in to comment.