From 060901f495ac4c5340f81197df8083b51dc6de41 Mon Sep 17 00:00:00 2001 From: kyrylomiro Date: Tue, 5 Mar 2024 23:08:48 +0100 Subject: [PATCH] add logs --- pkg/actionsmetrics/event_reader.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/actionsmetrics/event_reader.go b/pkg/actionsmetrics/event_reader.go index 2d55db34a4..4473bfd8b6 100644 --- a/pkg/actionsmetrics/event_reader.go +++ b/pkg/actionsmetrics/event_reader.go @@ -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" { @@ -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 }