mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-14 13:56:01 +03:00
perf improvement: Checks debuglog level before format debug msg
This commit is contained in:
parent
a037726308
commit
2ba788d2d7
@ -288,9 +288,12 @@ bool Rule::executeOperatorAt(Transaction *trans, std::string key,
|
||||
bool ret;
|
||||
|
||||
#ifndef NO_LOGS
|
||||
trans->debug(9, "Target value: \"" + utils::string::limitTo(80,
|
||||
if (trans && trans->m_rules && trans->m_rules->m_debugLog
|
||||
&& trans->m_rules->m_debugLog->getDebugLogLevel() >= 9) {
|
||||
trans->debug(9, "Target value: \"" + utils::string::limitTo(80,
|
||||
utils::string::toHexIfNeeded(value)) \
|
||||
+ "\" (Variable: " + key + ")");
|
||||
}
|
||||
#endif
|
||||
|
||||
ret = this->m_op->evaluateInternal(trans, this, value, ruleMessage);
|
||||
|
Loading…
x
Reference in New Issue
Block a user