Setting http response code on the auditlog

This commit is contained in:
Felipe Zimmerle 2017-10-19 23:26:08 -03:00
parent 274f9e5aa1
commit 34e8b140e5
No known key found for this signature in database
GPG Key ID: E6DFB08CE8B11277
3 changed files with 6 additions and 1 deletions

View File

@ -2,6 +2,8 @@
v3.0.????? - ?
---------------------------
- Setting http response code on the auditlog.
[Issue #1592 - @zimmerle]
- Refactoring on RuleMessage class, now accepting http code as parameter.
[@zimmerle]
- Having disruptive msgs as disruptive [instead of warnings] on audit log

View File

@ -72,6 +72,9 @@ class RuleMessage {
std::string log(int props) {
return RuleMessage::log(this, props);
}
std::string log(int props, int responseCode) {
return RuleMessage::log(this, props, responseCode);
}
std::string errorLog() {
return RuleMessage::log(this, ClientLogMessageInfo | ErrorLogTailLogMessageInfo);
}

View File

@ -1485,7 +1485,7 @@ std::string Transaction::toOldAuditLogFormat(int parts,
if (parts & audit_log::AuditLog::HAuditLogPart) {
audit_log << "--" << trailer << "-" << "H--" << std::endl;
for (auto a : m_rulesMessages) {
audit_log << a.log() << std::endl;
audit_log << a.log(0, m_httpCodeReturned) << std::endl;
}
audit_log << std::endl;
/** TODO: write audit_log H part. */