@@ -166,8 +166,8 @@ ngx_http_modsecurity_process_intervention (Transaction *transaction, ngx_http_re
166
166
return NGX_HTTP_INTERNAL_SERVER_ERROR ;
167
167
}
168
168
169
- // logging to nginx error log can be disable by setting `modsecurity_disable_error_log ` to on
170
- if (! mcf -> disable_error_log ) {
169
+ // logging to nginx error log can be disable by setting `modsecurity_use_error_log ` to off
170
+ if (mcf -> use_error_log ) {
171
171
log = intervention .log ;
172
172
if (intervention .log == NULL ) {
173
173
log = "(no log message was specified)" ;
@@ -522,11 +522,11 @@ static ngx_command_t ngx_http_modsecurity_commands[] = {
522
522
NULL
523
523
},
524
524
{
525
- ngx_string ("modsecurity_disable_error_log " ),
525
+ ngx_string ("modsecurity_use_error_log " ),
526
526
NGX_HTTP_LOC_CONF |NGX_HTTP_SRV_CONF |NGX_HTTP_MAIN_CONF |NGX_CONF_FLAG ,
527
527
ngx_conf_set_flag_slot ,
528
528
NGX_HTTP_LOC_CONF_OFFSET ,
529
- offsetof(ngx_http_modsecurity_conf_t , disable_error_log ),
529
+ offsetof(ngx_http_modsecurity_conf_t , use_error_log ),
530
530
NULL
531
531
},
532
532
ngx_null_command
@@ -740,7 +740,7 @@ ngx_http_modsecurity_create_conf(ngx_conf_t *cf)
740
740
conf -> rules_set = msc_create_rules_set ();
741
741
conf -> pool = cf -> pool ;
742
742
conf -> transaction_id = NGX_CONF_UNSET_PTR ;
743
- conf -> disable_error_log = NGX_CONF_UNSET ;
743
+ conf -> use_error_log = NGX_CONF_UNSET ;
744
744
#if defined(MODSECURITY_SANITY_CHECKS ) && (MODSECURITY_SANITY_CHECKS )
745
745
conf -> sanity_checks_enabled = NGX_CONF_UNSET ;
746
746
#endif
@@ -780,7 +780,7 @@ ngx_http_modsecurity_merge_conf(ngx_conf_t *cf, void *parent, void *child)
780
780
781
781
ngx_conf_merge_value (c -> enable , p -> enable , 0 );
782
782
ngx_conf_merge_ptr_value (c -> transaction_id , p -> transaction_id , NULL );
783
- ngx_conf_merge_value (c -> disable_error_log , p -> disable_error_log , 0 );
783
+ ngx_conf_merge_value (c -> use_error_log , p -> use_error_log , 1 );
784
784
#if defined(MODSECURITY_SANITY_CHECKS ) && (MODSECURITY_SANITY_CHECKS )
785
785
ngx_conf_merge_value (c -> sanity_checks_enabled , p -> sanity_checks_enabled , 0 );
786
786
#endif
0 commit comments