Skip to content

libmodsecurity - debug log does not contain timestamps, request IDs, URIs #1627

Closed
@defanator

Description

@defanator

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

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions