Skip to content

Commit

Permalink
executor: record slow-log when log use error level (#12359) (#12375)
Browse files Browse the repository at this point in the history
  • Loading branch information
sre-bot authored Sep 25, 2019
1 parent 148f08b commit 01d15c2
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 @@ -614,9 +614,6 @@ func (a *ExecStmt) logAudit() {
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().StmtCtx.StartTime)
threshold := time.Duration(atomic.LoadUint64(&cfg.Log.SlowThreshold)) * time.Millisecond
Expand Down

0 comments on commit 01d15c2

Please sign in to comment.