From 829e1276cba5dba7247a55dc28a3c4133e3cee11 Mon Sep 17 00:00:00 2001 From: artaasadi Date: Tue, 12 Nov 2024 17:44:29 +0100 Subject: [PATCH] fix: add logs to summarize --- pkg/compliance/runner/job.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/compliance/runner/job.go b/pkg/compliance/runner/job.go index 2b577e7ce..35f994256 100644 --- a/pkg/compliance/runner/job.go +++ b/pkg/compliance/runner/job.go @@ -405,6 +405,12 @@ func (w *Worker) runSqlWorkerJob(ctx context.Context, j Job, queryParamMap map[s return nil, fmt.Errorf("failed to execute query template: %w for query: %s", err, j.ExecutionPlan.Query.ID) } + w.logger.Info("runSqlWorkerJob QueryOutput", + zap.Uint("job_id", j.ID), + zap.Int("caller_count", len(j.ExecutionPlan.Callers)), + zap.String("query", j.ExecutionPlan.Query.QueryToExecute), + zap.String("query_id", j.ExecutionPlan.Query.ID), + zap.String("query", queryOutput.String())) res, err := w.steampipeConn.QueryAll(ctx, queryOutput.String()) if err != nil { w.logger.Error("failed to run query", zap.Error(err), zap.String("query_id", j.ExecutionPlan.Query.ID), zap.Stringp("integration_id", j.ExecutionPlan.IntegrationID))