Merge pull request #7 from safing/feature/speedup_fastcheckLevel

This commit is contained in:
Raskaro 2019-08-21 17:28:09 +02:00 committed by GitHub
commit 07310d605a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -216,8 +216,5 @@ func ErrorTracef(ctx context.Context, things ...interface{}) (ok bool) {
}
func fastcheckLevel(level severity) bool {
if uint32(level) < atomic.LoadUint32(logLevel) {
return false
}
return true
return uint32(level) >= atomic.LoadUint32(logLevel)
}