owasp-modsecurity / ModSecurity-apache

ModSecurity v3 Apache Connector
Apache License 2.0
88 stars 51 forks source link

Implement the logging callback #17

Open zimmerle opened 7 years ago

zimmerle commented 7 years ago

One of the ModSecurity logging features depending on write content on the webserver logging. In order to write in the webserver log, we need to create an wrapper/callback inside this apache module, that wrapper will be called by libModSecurity, presenting some content to be saved.

The callback used with the nginx implementation is available here: https://github.com/SpiderLabs/ModSecurity-nginx/blob/master/src/ngx_http_modsecurity_log.c#L25-L32

csanders-git commented 7 years ago

Log callback is specified via msc_set_log_cb(conf->modsec, ngx_http_modsecurity_log);