Description
According to legacy handbook for modsecurity 2.x, debug log line included some useful data [1]:
The line starts with metadata that is often longer than the message itself: the time, client’s IP address, internal server ID, internal request ID, request URI, and finally, the debug log level. The rest of the line is occupied by the message, which is essentially free-form.
In case of libmodsecurity, every debug log line starts from log level digit, there are no timestamps, request IDs, URIs, etc.
It would be great to have all these details for easier debugging.
In case of request ID, it also would be really nice to have an ability to obtain it from the initiating connector (e.g., nginx has $request_id
variable that could be used in libmodsecurity logs as well as in nginx access logs, bringing a bit more transparency for those who're digging in large amount of logs).
[1] https://www.feistyduck.com/library/modsecurity-handbook-free/online/ch04-logging.html