kys1230 commented on issue #7572:
URL: https://github.com/apache/apisix/issues/7572#issuecomment-1200227268

   Sorry, I reopened this problem. Comments above can generate custom variables 
(var_name) in a custom plugin A and through `logformat $var_name ` print to log
   But next, I want to read this custom variable (var_name) in the second 
custom plugin b to do additional functions. How can I get it?
   
   Because reqeust body needs to be read to generate custom variables,so two 
plugins (plugin a priority 90, plugin b priority 80) run in the rewrite phase.
   
   I try to use `ctx.var_name` or `ctx.var.var_name` in plugin b print custom 
variable (var_name), but they can't get the right results
   
   ---
   
   抱歉,我重新打开了这个问题。上面的讨论已经可以在自定义插件 A 中生成自定义变量(var_name),并通过 logformat $var_name 
打印到日志中。
   但是接下来,我希望在自定义插件 B 中使用这个自定义变量 (var_name),用于其他功能的判断依据,我应该如何访问它?
   
   因为自定义变量的生成需要读取 request body ,所以我的两个自定义插件都运行在 rewitre 阶段,插件 A 的优先级是 90 , 插件 B 
的优先级是 80 
   
   我尝试在插件 B 中通过 `ctx.var_name` 或 `ctx.var.var_name` 来打印这个自定义变量, 但是都没有得到正确的结果。
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to