mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-11-20 02:57:12 +03:00
Changes debuglogs schema to avoid unecessary str allocation
This commit is contained in:
@@ -27,10 +27,12 @@
|
||||
|
||||
#include "modsecurity/audit_log.h"
|
||||
#include "modsecurity/transaction.h"
|
||||
#include "modsecurity/rules.h"
|
||||
#include "src/utils/md5.h"
|
||||
#include "src/utils/https_client.h"
|
||||
|
||||
|
||||
|
||||
namespace modsecurity {
|
||||
namespace audit_log {
|
||||
namespace writer {
|
||||
@@ -47,9 +49,7 @@ bool Https::init(std::string *error) {
|
||||
|
||||
bool Https::write(Transaction *transaction, int parts, std::string *error) {
|
||||
Utils::HttpsClient m_http_client;
|
||||
#ifndef NO_LOGS
|
||||
transaction->debug(7, "Sending logs to: " + m_audit->m_path1);
|
||||
#endif
|
||||
ms_dbg_a(transaction, 7, "Sending logs to: " + m_audit->m_path1);
|
||||
|
||||
std::string log = transaction->toJSON(parts);
|
||||
m_http_client.setRequestType("application/json");
|
||||
|
||||
Reference in New Issue
Block a user