Skip to content

Commit bae1eff

Browse files
committed
Uses `ngx_log_error|ERR' to log the disruptive messages
1 parent f39e2a2 commit bae1eff

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/ngx_http_modsecurity_module.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ ngx_http_modsecurity_process_intervention (Transaction *transaction, ngx_http_re
8888
ModSecurityIntervention intervention;
8989
intervention.status = 200;
9090
intervention.url = NULL;
91+
intervention.log = NULL;
92+
intervention.disruptive = 0;
9193

9294
dd("processing intervention");
9395

@@ -100,6 +102,8 @@ ngx_http_modsecurity_process_intervention (Transaction *transaction, ngx_http_re
100102
intervention.log = "(no log message was specified)";
101103
}
102104

105+
ngx_log_error(NGX_LOG_ERR, (ngx_log_t *)r->connection->log, 0, "%s", intervention.log);
106+
103107
if (intervention.url != NULL)
104108
{
105109
dd("intervention -- redirecting to: %s with status code: %d", intervention.url, intervention.status);

0 commit comments

Comments
 (0)