mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-29 19:24:29 +03:00
DebugLogs are now being redirected to the correct files
This commit is contained in:
@@ -28,9 +28,8 @@ CustomDebugLog *CustomDebugLog::new_instance() {
|
||||
}
|
||||
|
||||
|
||||
bool CustomDebugLog::write_log(int level, const std::string& message) {
|
||||
void CustomDebugLog::write(int level, const std::string& message) {
|
||||
m_log << "[" << level << "] " << message << std::endl;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -27,7 +27,7 @@ class CustomDebugLog : public ModSecurity::DebugLog {
|
||||
public:
|
||||
CustomDebugLog *new_instance();
|
||||
|
||||
bool write_log(int level, const std::string& message) override;
|
||||
void write(int level, const std::string& message) override;
|
||||
bool contains(const std::string& pattern);
|
||||
std::string log_messages();
|
||||
|
||||
|
@@ -191,7 +191,7 @@ end:
|
||||
modsec_assay->processLogging(r.status);
|
||||
|
||||
CustomDebugLog *d = reinterpret_cast<CustomDebugLog *>
|
||||
(modsec_rules->debugLog);
|
||||
(modsec_rules->m_debugLog);
|
||||
|
||||
if (d != NULL) {
|
||||
if (!d->contains(t->debug_log)) {
|
||||
@@ -220,7 +220,7 @@ after_debug_log:
|
||||
delete modsec_assay;
|
||||
delete modsec_rules;
|
||||
delete modsec;
|
||||
delete debug_log;
|
||||
/* delete debug_log; */
|
||||
|
||||
res->insert(res->end(), r.begin(), r.end());
|
||||
}
|
||||
|
Reference in New Issue
Block a user