Skip to content

Commit

Permalink
executor: record slow-log when log use error level (#12359)
Browse files Browse the repository at this point in the history
  • Loading branch information
lysu authored and sre-bot committed Sep 25, 2019
1 parent 65d6597 commit e414589
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions executor/adapter.go
Original file line number Diff line number Diff line change
Expand Up @@ -748,9 +748,6 @@ func FormatSQL(sql string, pps variable.PreparedParams) stringutil.StringerFunc
func (a *ExecStmt) LogSlowQuery(txnTS uint64, succ bool) {
sessVars := a.Ctx.GetSessionVars()
level := log.GetLevel()
if level > zapcore.WarnLevel {
return
}
cfg := config.GetGlobalConfig()
costTime := time.Since(a.Ctx.GetSessionVars().StartTime)
threshold := time.Duration(atomic.LoadUint64(&cfg.Log.SlowThreshold)) * time.Millisecond
Expand Down

0 comments on commit e414589

Please sign in to comment.