Support to JSON stuff on serial logging

This commit is contained in:
Victor Hora
2017-10-03 20:50:02 +00:00
committed by Felipe Zimmerle
parent 2988c5bb07
commit 63bef3d142
16 changed files with 7388 additions and 7223 deletions

View File

@@ -23,7 +23,16 @@ namespace modsecurity {
namespace audit_log {
namespace writer {
void Writer::generateBoundary(std::string *boundary) {
static const char alphanum[] =
"0123456789"
"ABCDEFGHIJKLMNOPQRSTUVWXYZ"
"abcdefghijklmnopqrstuvwxyz";
for (int i = 0; i < SERIAL_AUDIT_LOG_BOUNDARY_LENGTH; ++i) {
boundary->append(1, alphanum[rand() % (sizeof(alphanum) - 1)]);
}
}
} // namespace writer
} // namespace audit_log