Skip to content

Commit

Permalink
Modify args of logger so that it follows key/value pairs
Browse files Browse the repository at this point in the history
Fixes doitintl#303 partially

Signed-off-by: sshota0809 <8736380+sshota0809@users.noreply.github.com>
  • Loading branch information
sshota0809 committed Jan 8, 2021
1 parent c6f1882 commit 7a8742d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ func (td *SampleDatasource) query(ctx context.Context, query backend.DataQuery)

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

if err != nil {
log.DefaultLogger.Info("Query run error: %v\n", err)
log.DefaultLogger.Info("Query run error", "Error", err)
return nil, err
}
status, err := job.Wait(ctx)
if err != nil {
log.DefaultLogger.Info("Query wait", "error: %v\n", err)
log.DefaultLogger.Info("Query wait", "Error", err)
return nil, err
}
if err := status.Err(); err != nil {
log.DefaultLogger.Info("Query status error: %v\n", err)
log.DefaultLogger.Info("Query status error", "Error", err)
return nil, err
}
it, err := job.Read(ctx)
Expand Down

0 comments on commit 7a8742d

Please sign in to comment.