Changes debuglogs schema to avoid unecessary str allocation

This commit is contained in:
Felipe Zimmerle
2018-10-19 16:56:33 -03:00
parent 23e0d35d2d
commit ef7f65db90
57 changed files with 1100 additions and 1374 deletions

View File

@@ -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");