mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-17 18:05:28 +03:00
Adds checks for the NO_LOGS definition and improved the vars resolution time
This commit is contained in:
@@ -67,18 +67,24 @@ namespace operators {
|
||||
|
||||
|
||||
bool Operator::debug(Assay *assay, int x, std::string a) {
|
||||
#ifndef NO_LOGS
|
||||
assay->debug(x, a);
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
bool Operator::evaluate(Assay *assay) {
|
||||
if (assay) {
|
||||
#ifndef NO_LOGS
|
||||
assay->debug(2, "Operator: " + this->op + \
|
||||
" is not implemented or malfunctioning.");
|
||||
#endif
|
||||
} else {
|
||||
#ifndef NO_LOGS
|
||||
std::cerr << "Operator: " + this->op + \
|
||||
" is not implemented or malfunctioning.";
|
||||
#endif
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@@ -86,11 +92,15 @@ bool Operator::evaluate(Assay *assay) {
|
||||
|
||||
bool Operator::evaluate(Assay *assay, const std::string& a) {
|
||||
if (assay) {
|
||||
#ifndef NO_LOGS
|
||||
assay->debug(2, "Operator: " + this->op + \
|
||||
" is not implemented or malfunctioning.");
|
||||
#endif
|
||||
} else {
|
||||
#ifndef NO_LOGS
|
||||
std::cerr << "Operator: " + this->op + \
|
||||
" is not implemented or malfunctioning.";
|
||||
#endif
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user