Skip to content

Commit

Permalink
Merge pull request influxdata#7067 from influxdata/js-add-quiet-execu…
Browse files Browse the repository at this point in the history
…tion-option

Add option to suppress logging query statements in the query executor
  • Loading branch information
jsternberg authored Jul 26, 2016
2 parents 8e1f238 + 7b8bcfb commit a101f52
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion influxql/query_executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ type ExecutionOptions struct {

// Node to execute on.
NodeID uint64

// Quiet suppresses non-essential output from the query executor.
Quiet bool
}

// ExecutionContext contains state that the query is currently executing with.
Expand Down Expand Up @@ -226,7 +229,9 @@ func (e *QueryExecutor) executeQuery(query *Query, opt ExecutionOptions, closing
}

// Log each normalized statement.
e.Logger.Println(stmt.String())
if !ctx.Quiet {
e.Logger.Println(stmt.String())
}

// Send any other statements to the underlying statement executor.
err = e.StatementExecutor.ExecuteStatement(stmt, ctx)
Expand Down

0 comments on commit a101f52

Please sign in to comment.