spacewander commented on code in PR #6960:
URL: https://github.com/apache/apisix/pull/6960#discussion_r868702309
##########
apisix/stream/xrpc/sdk.lua:
##########
@@ -108,6 +108,10 @@ function _M.get_req_ctx(session, id)
local ctx = core.tablepool.fetch("xrpc_ctxs", 4, 4)
-- fields start with '_' should not be accessed by the protocol
implementation
ctx._id = id
+ core.ctx.set_vars_meta(ctx)
+ ctx.conf_id = tostring(session._route.protocol)
Review Comment:
Better to set a per-logger conf_id because multiple instances of the same
logger plugin can be used together.
##########
apisix/stream/xrpc/runner.lua:
##########
@@ -70,9 +74,49 @@ local function put_req_ctx(session, ctx)
end
+local function filter_logger(ctx, logger)
+ if not logger or not logger.filter or #logger.filter == 0 then
Review Comment:
The logger can't be nil, and we should return true when filter is missing?
--
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]