mirror of
https://github.com/owasp-modsecurity/ModSecurity.git
synced 2025-09-30 11:44:32 +03:00
Support to JSON stuff on serial logging
This commit is contained in:
committed by
Felipe Zimmerle
parent
2988c5bb07
commit
63bef3d142
@@ -53,6 +53,12 @@ class AuditLog {
|
||||
RelevantOnlyAuditLogStatus
|
||||
};
|
||||
|
||||
enum AuditLogFormat {
|
||||
NotSetAuditLogFormat,
|
||||
JSONAuditLogFormat,
|
||||
NativeAuditLogFormat
|
||||
};
|
||||
|
||||
enum AuditLogParts {
|
||||
/**
|
||||
* Audit log header (mandatory).
|
||||
@@ -150,6 +156,7 @@ class AuditLog {
|
||||
bool setFilePath1(const std::basic_string<char>& path);
|
||||
bool setFilePath2(const std::basic_string<char>& path);
|
||||
bool setStorageDir(const std::basic_string<char>& path);
|
||||
bool setFormat(AuditLogFormat format);
|
||||
|
||||
int getDirectoryPermission();
|
||||
int getFilePermission();
|
||||
@@ -186,6 +193,7 @@ class AuditLog {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
AuditLogFormat m_format;
|
||||
|
||||
protected:
|
||||
int m_parts;
|
||||
@@ -198,7 +206,7 @@ class AuditLog {
|
||||
int m_directoryPermission;
|
||||
int m_defaultDirectoryPermission = 0750;
|
||||
|
||||
private:
|
||||
private:
|
||||
AuditLogStatus m_status;
|
||||
|
||||
AuditLogType m_type;
|
||||
|
@@ -319,7 +319,8 @@ class Transaction : public TransactionAnchoredVariables {
|
||||
size_t offset);
|
||||
|
||||
const char *getResponseBody();
|
||||
int getResponseBodyLength();
|
||||
size_t getResponseBodyLength();
|
||||
size_t getRequestBodyLength();
|
||||
|
||||
#ifndef NO_LOGS
|
||||
void debug(int, std::string);
|
||||
@@ -612,7 +613,10 @@ int msc_process_uri(Transaction *transaction, const char *uri,
|
||||
const char *msc_get_response_body(Transaction *transaction);
|
||||
|
||||
/** @ingroup ModSecurity_C_API */
|
||||
int msc_get_response_body_length(Transaction *transaction);
|
||||
size_t msc_get_response_body_length(Transaction *transaction);
|
||||
|
||||
/** @ingroup ModSecurity_C_API */
|
||||
size_t msc_get_request_body_length(Transaction *transaction);
|
||||
|
||||
/** @ingroup ModSecurity_C_API */
|
||||
void msc_transaction_cleanup(Transaction *transaction);
|
||||
|
Reference in New Issue
Block a user