mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-08-15 23:55:03 +03:00
perf improvement: Checks debuglog level before format debug msg
This commit is contained in:
parent
0967aadc2f
commit
068f7ea29f
@ -288,9 +288,12 @@ bool Rule::executeOperatorAt(Transaction *trans, std::string key,
|
|||||||
bool ret;
|
bool ret;
|
||||||
|
|
||||||
#ifndef NO_LOGS
|
#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)) \
|
utils::string::toHexIfNeeded(value)) \
|
||||||
+ "\" (Variable: " + key + ")");
|
+ "\" (Variable: " + key + ")");
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
ret = this->m_op->evaluateInternal(trans, this, value, ruleMessage);
|
ret = this->m_op->evaluateInternal(trans, this, value, ruleMessage);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user