Adds support to C section on auditlogs

This commit is contained in:
Felipe Zimmerle 2017-07-25 23:13:23 -03:00
parent 15ca5ceab4
commit 43cb8ed652
No known key found for this signature in database
GPG Key ID: E6DFB08CE8B11277

View File

@ -1407,10 +1407,14 @@ std::string Transaction::toOldAuditLogFormat(int parts,
}
audit_log << std::endl;
}
if (parts & audit_log::AuditLog::CAuditLogPart) {
if (parts & audit_log::AuditLog::CAuditLogPart
&& m_requestBody.tellp() > 0) {
std::string body = m_requestBody.str();
audit_log << "--" << trailer << "-" << "C--" << std::endl;
if (body.size() > 0) {
audit_log << body << std::endl;
}
audit_log << std::endl;
/** TODO: write audit_log C part. */
}
if (parts & audit_log::AuditLog::DAuditLogPart) {
audit_log << "--" << trailer << "-" << "D--" << std::endl;