@@ -41,11 +41,11 @@ static ngx_command_t ngx_http_apisix_cmds[] = {
4141 offsetof(ngx_http_apisix_loc_conf_t , delay_client_max_body_check ),
4242 NULL },
4343 {
44- ngx_string ("apisix_request_id_var " ),
44+ ngx_string ("lua_error_log_request_id " ),
4545 NGX_HTTP_MAIN_CONF |NGX_HTTP_SRV_CONF |NGX_HTTP_LOC_CONF |NGX_CONF_TAKE1 ,
4646 ngx_http_apisix_error_log_request_id ,
4747 NGX_HTTP_LOC_CONF_OFFSET ,
48- offsetof(ngx_http_apisix_loc_conf_t , request_id_var_index ),
48+ offsetof(ngx_http_apisix_loc_conf_t , apisix_request_id_var_index ),
4949 NULL
5050 },
5151 ngx_null_command
@@ -112,7 +112,7 @@ ngx_http_apisix_create_loc_conf(ngx_conf_t *cf)
112112 }
113113
114114 conf -> delay_client_max_body_check = NGX_CONF_UNSET ;
115- conf -> request_id_var_index = NGX_CONF_UNSET ;
115+ conf -> apisix_request_id_var_index = NGX_CONF_UNSET ;
116116 return conf ;
117117}
118118
@@ -123,7 +123,7 @@ ngx_http_apisix_merge_loc_conf(ngx_conf_t *cf, void *parent, void *child)
123123 ngx_http_apisix_loc_conf_t * prev = parent ;
124124 ngx_http_apisix_loc_conf_t * conf = child ;
125125
126- ngx_conf_merge_value (conf -> request_id_var_index , prev -> request_id_var_index , NGX_CONF_UNSET );
126+ ngx_conf_merge_value (conf -> apisix_request_id_var_index , prev -> apisix_request_id_var_index , NGX_CONF_UNSET );
127127 ngx_conf_merge_value (conf -> delay_client_max_body_check ,
128128 prev -> delay_client_max_body_check , 0 );
129129
@@ -843,7 +843,7 @@ ngx_http_apisix_is_ntls_enabled(ngx_http_conf_ctx_t *conf_ctx)
843843/*
844844 * This function contains the logic to append the Request ID to
845845 * the error log line when being called.
846- * Get the location configuration from helper function. Find indexed variable with the loc_conf->request_id_var_index . and add that to buffer.
846+ * Get the location configuration from helper function. Find indexed variable with the loc_conf->apisix_request_id_var_index . and add that to buffer.
847847 */
848848static u_char *
849849ngx_http_apisix_error_log_handler (ngx_http_request_t * r , u_char * buf , size_t len )
@@ -852,11 +852,11 @@ ngx_http_apisix_error_log_handler(ngx_http_request_t *r, u_char *buf, size_t len
852852 ngx_http_apisix_loc_conf_t * loc_conf ;
853853
854854 loc_conf = ngx_http_get_module_loc_conf (r , ngx_http_apisix_module );
855- if (loc_conf -> request_id_var_index == NGX_CONF_UNSET ) {
855+ if (loc_conf -> apisix_request_id_var_index == NGX_CONF_UNSET ) {
856856 return buf ;
857857 }
858858
859- request_id_var = ngx_http_get_indexed_variable (r , loc_conf -> request_id_var_index );
859+ request_id_var = ngx_http_get_indexed_variable (r , loc_conf -> apisix_request_id_var_index );
860860 if (request_id_var == NULL || request_id_var -> not_found ) {
861861 return buf ;
862862 }
@@ -959,8 +959,8 @@ ngx_http_apisix_error_log_request_id(ngx_conf_t *cf, ngx_command_t *cmd, void *c
959959 value [1 ].len -- ;
960960 value [1 ].data ++ ;
961961
962- loc_conf -> request_id_var_index = ngx_http_get_variable_index (cf , & value [1 ]);
963- if (loc_conf -> request_id_var_index == NGX_ERROR ) {
962+ loc_conf -> apisix_request_id_var_index = ngx_http_get_variable_index (cf , & value [1 ]);
963+ if (loc_conf -> apisix_request_id_var_index == NGX_ERROR ) {
964964 return NGX_CONF_ERROR ;
965965 }
966966
0 commit comments