Skip to content
This repository was archived by the owner on Dec 11, 2022. It is now read-only.

Commit 4977056

Browse files
authored
Merge pull request #304 from sshota0809/master
modify args of logger so that it follows key/value pairs(Fixes #303 partially)
2 parents c6f1882 + 7a8742d commit 4977056

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

pkg/plugin.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ func (td *SampleDatasource) query(ctx context.Context, query backend.DataQuery)
110110

111111
rows, err := BigQueryRun(ctx, qm)
112112
if err != nil {
113-
log.DefaultLogger.Error("query BigQueryRun error %v", err)
113+
log.DefaultLogger.Error("query BigQueryRun error", "Error", err)
114114
}
115115
// Log a warning if `Format` is empty.
116116
if qm.Format == "" {
@@ -184,16 +184,16 @@ func BigQueryRun(ctx context.Context, query queryModel) (*TransformedResults, er
184184
job, err := q.Run(ctx)
185185

186186
if err != nil {
187-
log.DefaultLogger.Info("Query run error: %v\n", err)
187+
log.DefaultLogger.Info("Query run error", "Error", err)
188188
return nil, err
189189
}
190190
status, err := job.Wait(ctx)
191191
if err != nil {
192-
log.DefaultLogger.Info("Query wait", "error: %v\n", err)
192+
log.DefaultLogger.Info("Query wait", "Error", err)
193193
return nil, err
194194
}
195195
if err := status.Err(); err != nil {
196-
log.DefaultLogger.Info("Query status error: %v\n", err)
196+
log.DefaultLogger.Info("Query status error", "Error", err)
197197
return nil, err
198198
}
199199
it, err := job.Read(ctx)

0 commit comments

Comments
 (0)