From 426b6ee15159c7b5b0939768238a161162ab48ba Mon Sep 17 00:00:00 2001
From: "Jonathan A. Sternberg" <jonathan@influxdata.com>
Date: Wed, 21 Feb 2018 11:25:38 -0600
Subject: [PATCH] Update sample config with information on logging levels

Update the query executor to log a message using the style guide. The
actual message is static and the query is now in a context field.
---
 etc/config.sample.toml  | 4 +++-
 query/query_executor.go | 2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/etc/config.sample.toml b/etc/config.sample.toml
index 977bea58e4..31cd09004e 100644
--- a/etc/config.sample.toml
+++ b/etc/config.sample.toml
@@ -292,7 +292,9 @@
   # logfmt.
   # format = "auto"
 
-  # Determines which level of logs will be emitted.
+  # Determines which level of logs will be emitted. The available levels
+  # are error, warn, info, and debug. Logs that are equal to or above the
+  # specified level will be emitted.
   # level = "info"
 
   # Suppresses the logo output that is printed when the program is started.
diff --git a/query/query_executor.go b/query/query_executor.go
index aefb5957dc..5c320242a4 100644
--- a/query/query_executor.go
+++ b/query/query_executor.go
@@ -382,7 +382,7 @@ LOOP:
 
 		// Log each normalized statement.
 		if !ctx.Quiet {
-			e.Logger.Info(stmt.String())
+			e.Logger.Info("Executing query", zap.Stringer("query", stmt))
 		}
 
 		// Send any other statements to the underlying statement executor.