Skip to content

Commit

Permalink
Merge pull request #14417 from influxdata/info_logger
Browse files Browse the repository at this point in the history
move logger facility back to Info from Debug
  • Loading branch information
sebito91 authored Jul 23, 2019
2 parents c316edf + 0653043 commit 8ad7639
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions logger/fields.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func NewOperation(ctx context.Context, log *zap.Logger, msg, name string, fields

now := time.Now()
log = log.With(f...)
log.Debug(msg+" (start)", OperationEventStart())
log.Info(msg+" (start)", OperationEventStart())

return log, func() { log.Debug(msg+" (end)", OperationEventEnd(), OperationElapsed(time.Since(now))) }
return log, func() { log.Info(msg+" (end)", OperationEventEnd(), OperationElapsed(time.Since(now))) }
}
8 changes: 4 additions & 4 deletions task/backend/executor/executor.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@ func (p *syncRunPromise) finish(res *runResult, err error) {
close(p.ready)

if err != nil {
p.logger.Debug("Execution failed to get result", zap.Error(err))
p.logger.Info("Execution failed to get result", zap.Error(err))
} else if res.err != nil {
p.logger.Debug("Got result with error", zap.Error(res.err))
p.logger.Info("Got result with error", zap.Error(res.err))
} else {
p.logger.Debug("Completed successfully")
p.logger.Info("Completed successfully")
}
})
}
Expand Down Expand Up @@ -378,7 +378,7 @@ func (p *asyncRunPromise) finish(res *runResult, err error) {
} else if res.err != nil {
p.logger.Info("Got result with error", zap.Error(res.err))
} else {
p.logger.Debug("Completed successfully")
p.logger.Info("Completed successfully")
}
})
}
Expand Down
4 changes: 2 additions & 2 deletions task/backend/scheduler.go
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@ func (r *runner) startFromWorking(now int64) {
// and we'll quickly end up with many run_ids associated with the log.
runLogger := r.logger.With(logger.TraceID(ctx), zap.String("run_id", qr.RunID.String()), zap.Int64("now", qr.Now))

runLogger.Debug("Created run; beginning execution")
runLogger.Info("Created run; beginning execution")
r.wg.Add(1)
go r.executeAndWait(ctx, qr, runLogger)

Expand Down Expand Up @@ -784,7 +784,7 @@ func (r *runner) executeAndWait(ctx context.Context, qr QueuedRun, runLogger *za
r.taskControlService.AddRunLog(authCtx, r.task.ID, qr.RunID, time.Now(), string(b))
}
r.updateRunState(qr, RunSuccess, runLogger)
runLogger.Debug("Execution succeeded")
runLogger.Info("Execution succeeded")

// Check again if there is a new run available, without returning to idle state.
r.startFromWorking(atomic.LoadInt64(r.ts.now))
Expand Down

0 comments on commit 8ad7639

Please sign in to comment.