This may happen in some situations if the app-layer parser only sees
unknown messages and sets an event: there will be an empty transaction,
but nothing to log.
Related to
Task #5566
js.set_object("request", &log_request(request, flags)?)?;
} else if tx.responses.is_empty() {
SCLogDebug!("Suricata created an empty PGSQL transaction");
- // TODO Log anomaly event instead?
- js.set_bool("request", false)?;
- js.set_bool("response", false)?;
+ // TODO Log anomaly event?
+ // if there are no transactions, there's nothing more to be logged
js.close()?;
return Ok(());
}