tzssangglass commented on code in PR #7041:
URL: https://github.com/apache/apisix/pull/7041#discussion_r873532767


##########
apisix/stream/xrpc/protocols/redis/init.lua:
##########
@@ -31,6 +31,15 @@ local ipairs = ipairs
 local tonumber = tonumber
 
 
+core.ctx.register_var("redis_cmd_line", function(ctx)
+    local curr_ctx = ctx.xrpc_session and ctx.xrpc_session._curr_ctx
+    if not curr_ctx then
+        core.log.warn("can't find current context")
+        return nil
+    end
+    return curr_ctx.cmd

Review Comment:
   Ok, I know, redis_cmd_line will only be used for logs, not filters.



-- 
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