Writes audit log in parallel mode

First version still missing the index among other things
This commit is contained in:
Felipe Zimmerle
2015-07-10 15:23:15 -03:00
parent 693238b235
commit c9620ac50f
13 changed files with 164 additions and 30 deletions

View File

@@ -23,20 +23,28 @@
#include <fstream>
#endif
#include "modsecurity/assay.h"
#ifdef __cplusplus
namespace ModSecurity {
class AuditLog;
/** @ingroup ModSecurity_CPP_API */
class AuditLogWriter : public std::ofstream {
public:
AuditLogWriter() { }
explicit AuditLogWriter(AuditLog *audit)
: m_audit(audit) { }
virtual bool close() { return true; }
virtual bool init() { return true; }
virtual bool write(const std::string& log);
virtual bool write(Assay *assay);
std::string file_name(const std::string& unique_id);
protected:
AuditLog *m_audit;
};
} // namespace ModSecurity