Merge pull request #7067 from influxdata/js-add-quiet-execution-option

Add option to suppress logging query statements in the query executor
pull/7069/head
Jonathan A. Sternberg 2016-07-26 15:38:05 -05:00 committed by GitHub
commit a101f52e34
1 changed files with 6 additions and 1 deletions

View File

@ -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)