Skip to content

Commit 0276b34

Browse files
defanatorFelipe Zimmerle
authored andcommitted
All ngx_log_debug() calls changed to ngx_log_debug0().
1 parent 94de807 commit 0276b34

File tree

1 file changed

+17
-17
lines changed

1 file changed

+17
-17
lines changed

nginx/modsecurity/ngx_http_modsecurity.c

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -566,7 +566,7 @@ ngx_http_modsecurity_load_request_body(ngx_http_request_t *r)
566566
ngx_http_modsecurity_ctx_t *ctx;
567567
ngx_chain_t *chain;
568568

569-
ngx_log_debug(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
569+
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
570570
"ModSec: loading request body.");
571571

572572
ctx = ngx_http_get_module_ctx(r, ngx_http_modsecurity);
@@ -583,7 +583,7 @@ ngx_http_modsecurity_load_request_body(ngx_http_request_t *r)
583583

584584
#ifdef MOVE_REQUEST_CHAIN_TO_MODSEC
585585
if (move_chain_to_brigade(chain, ctx->brigade, r->pool, 1) != NGX_OK) {
586-
ngx_log_debug(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
586+
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
587587
"ModSec: failed to move chain to brigade.");
588588

589589
return NGX_ERROR;
@@ -592,7 +592,7 @@ ngx_http_modsecurity_load_request_body(ngx_http_request_t *r)
592592
r->request_body = NULL;
593593
#else
594594
if (copy_chain_to_brigade(chain, ctx->brigade, r->pool, 1) != NGX_OK) {
595-
ngx_log_debug(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
595+
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
596596
"ModSec: failed to copy chain to brigade.");
597597

598598
return NGX_ERROR;
@@ -639,7 +639,7 @@ ngx_http_modsecurity_save_request_body(ngx_http_request_t *r)
639639

640640
r->headers_in.content_length_n = content_length;
641641

642-
ngx_log_debug(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
642+
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
643643
"ModSec: Content length: %O, Content length n: %O", content_length,
644644
r->headers_in.content_length_n);
645645
#else
@@ -914,25 +914,25 @@ ngx_http_modsecurity_process_request(ngx_http_request_t *r)
914914

915915
ctx = ngx_http_get_module_pool_ctx(r, ngx_http_modsecurity);
916916

917-
ngx_log_debug(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
917+
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
918918
"ModSec: starting to process the request...");
919919

920920
if (ngx_http_modsecurity_load_request(r) != NGX_OK) {
921-
ngx_log_debug(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
921+
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
922922
"ModSec: failed while loading the request.");
923923
return NGX_HTTP_INTERNAL_SERVER_ERROR;
924924
}
925925

926926
if (ngx_http_modsecurity_load_headers_in(r) != NGX_OK) {
927-
ngx_log_debug(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
927+
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
928928
"ModSec: failed while loading the headers.");
929929
return NGX_HTTP_INTERNAL_SERVER_ERROR;
930930
}
931931

932932
rc = modsecProcessRequestHeaders(ctx->req);
933933
rc = ngx_http_modsecurity_status(r, rc);
934934
if (rc != NGX_DECLINED) {
935-
ngx_log_debug(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
935+
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
936936
"ModSec: failed while processing the request headers");
937937
return rc;
938938
}
@@ -952,32 +952,32 @@ ngx_http_modsecurity_process_request(ngx_http_request_t *r)
952952
modsecContextState(ctx->req) != MODSEC_DISABLED) {
953953

954954
load_request_body = 1;
955-
ngx_log_debug(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
955+
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
956956
"ModSec: request body will be processed...");
957957
}
958958

959959
if (load_request_body == 1) {
960-
ngx_log_debug(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
960+
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
961961
"ModSec: loading request body...");
962962

963963
rc = ngx_http_modsecurity_load_request_body(r);
964964
if (rc != NGX_OK)
965965
{
966-
ngx_log_debug(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
966+
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
967967
"ModSec: failed while loading the request body.");
968968
return NGX_HTTP_INTERNAL_SERVER_ERROR;
969969
}
970970

971971

972972
}
973973

974-
ngx_log_debug(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
974+
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
975975
"ModSec: processing request body...");
976976
rc = modsecProcessRequestBody(ctx->req);
977977
rc = ngx_http_modsecurity_status(r, rc);
978978
if (rc != NGX_DECLINED)
979979
{
980-
ngx_log_debug(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
980+
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
981981
"ModSec: finalizing the connection after process the " \
982982
"request body.");
983983

@@ -986,13 +986,13 @@ ngx_http_modsecurity_process_request(ngx_http_request_t *r)
986986
if (load_request_body == 1) {
987987
if (ngx_http_modsecurity_save_request_body(r) != NGX_OK)
988988
{
989-
ngx_log_debug(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
989+
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
990990
"ModSec: failed while saving the request body");
991991
return NGX_HTTP_INTERNAL_SERVER_ERROR;
992992
}
993993
if (ngx_http_modsecurity_save_headers_in(r) != NGX_OK)
994994
{
995-
ngx_log_debug(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
995+
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
996996
"ModSec: failed while saving the headers in");
997997
return NGX_HTTP_INTERNAL_SERVER_ERROR;
998998
}
@@ -1199,7 +1199,7 @@ ngx_http_modsecurity_handler(ngx_http_request_t *r) {
11991199
}
12001200

12011201
if (ctx->body_requested == 0) {
1202-
ngx_log_debug(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
1202+
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
12031203
"ModSec: asking for the request body, if any.");
12041204

12051205
ctx->body_requested = 1;
@@ -1395,7 +1395,7 @@ ngx_http_modsecurity_body_filter(ngx_http_request_t *r, ngx_chain_t *in)
13951395

13961396
rc = move_brigade_to_chain(ctx->brigade, &out, r->pool);
13971397
if (rc == NGX_ERROR) {
1398-
ngx_log_debug(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
1398+
ngx_log_debug0(NGX_LOG_DEBUG_HTTP, r->connection->log, 0,
13991399
"ModSec: Problems moving brigade to chain");
14001400

14011401
return ngx_http_filter_finalize_request(r,

0 commit comments

Comments
 (0)