Skip to content

Commit

Permalink
executor: record slow-log when log use error level (#12359) (#12377)
Browse files Browse the repository at this point in the history
  • Loading branch information
sre-bot authored Sep 25, 2019
1 parent 4120985 commit 7c48202
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 @@ -649,9 +649,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 7c48202

Please sign in to comment.