@@ -166,8 +166,8 @@ ngx_http_modsecurity_process_intervention (Transaction *transaction, ngx_http_re
166166        return  NGX_HTTP_INTERNAL_SERVER_ERROR ;
167167    }
168168
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 ) {
171171        log  =  intervention .log ;
172172        if  (intervention .log  ==  NULL ) {
173173          log  =  "(no log message was specified)" ;
@@ -522,11 +522,11 @@ static ngx_command_t ngx_http_modsecurity_commands[] =  {
522522    NULL 
523523  },
524524  {
525-     ngx_string ("modsecurity_disable_error_log " ),
525+     ngx_string ("modsecurity_use_error_log " ),
526526    NGX_HTTP_LOC_CONF |NGX_HTTP_SRV_CONF |NGX_HTTP_MAIN_CONF |NGX_CONF_FLAG ,
527527    ngx_conf_set_flag_slot ,
528528    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 ),
530530    NULL 
531531  },
532532  ngx_null_command 
@@ -740,7 +740,7 @@ ngx_http_modsecurity_create_conf(ngx_conf_t *cf)
740740    conf -> rules_set  =  msc_create_rules_set ();
741741    conf -> pool  =  cf -> pool ;
742742    conf -> transaction_id  =  NGX_CONF_UNSET_PTR ;
743-     conf -> disable_error_log  =  NGX_CONF_UNSET ;
743+     conf -> use_error_log  =  NGX_CONF_UNSET ;
744744#if  defined(MODSECURITY_SANITY_CHECKS ) &&  (MODSECURITY_SANITY_CHECKS )
745745    conf -> sanity_checks_enabled  =  NGX_CONF_UNSET ;
746746#endif 
@@ -780,7 +780,7 @@ ngx_http_modsecurity_merge_conf(ngx_conf_t *cf, void *parent, void *child)
780780
781781    ngx_conf_merge_value (c -> enable , p -> enable , 0 );
782782    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 );
784784#if  defined(MODSECURITY_SANITY_CHECKS ) &&  (MODSECURITY_SANITY_CHECKS )
785785    ngx_conf_merge_value (c -> sanity_checks_enabled , p -> sanity_checks_enabled , 0 );
786786#endif 
0 commit comments