Skip to content

Commit

Permalink
add logs (#11)
Browse files Browse the repository at this point in the history
Co-authored-by: kyrylomiro <[email protected]>
  • Loading branch information
kyrylomiro and kyrylomiro authored Mar 5, 2024
1 parent 41e7990 commit 834fb3d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/actionsmetrics/event_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,7 @@ func (reader *EventReader) ProcessWorkflowJobEvent(ctx context.Context, event in
s := parseResult.RunTime.Seconds()
runTimeSeconds = &s

log.WithValues(keysAndValues...).Info("reading workflow_job logs", "exit_code", exitCode)
log.Info("reading workflow_job logs", "exit_code", exitCode, "run_time_seconds", &runTimeSeconds, "parseResult", &parseResult)
}

if *e.WorkflowJob.Conclusion == "failure" {
Expand Down Expand Up @@ -273,7 +273,7 @@ func (reader *EventReader) fetchAndParseWorkflowJobLogs(ctx context.Context, e *
continue
}

if strings.HasPrefix(line, "Job is about to start running on the runner:") || strings.HasPrefix(line, "Current runner version:") {
if strings.HasPrefix(strings.ToLower(line), strings.ToLower("Job is about to start running on the runner:")) || strings.HasPrefix(strings.ToLower(line), strings.ToLower("Current runner version:")) {
startedTime, _ = time.Parse(time.RFC3339, timestamp)
continue
}
Expand Down

0 comments on commit 834fb3d

Please sign in to comment.