Skip to content

Commit

Permalink
fix: add logs to summarize
Browse files Browse the repository at this point in the history
  • Loading branch information
artaasadi committed Nov 12, 2024
1 parent 9f6f4cb commit 829e127
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/compliance/runner/job.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 829e127

Please sign in to comment.