Merge pull request #7067 from influxdata/js-add-quiet-execution-option
Add option to suppress logging query statements in the query executorpull/7069/head
commit
a101f52e34
|
@ -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.
|
||||
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue