You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by "bzp2010 (via GitHub)" <gi...@apache.org> on 2023/07/18 10:28:40 UTC
[GitHub] [apisix] bzp2010 commented on a diff in pull request #9850: fix: loki-logger nil context in batch processor
bzp2010 commented on code in PR #9850:
URL: https://github.com/apache/apisix/pull/9850#discussion_r1266576351
##########
apisix/plugins/loki-logger.lua:
##########
@@ -191,19 +191,16 @@ function _M.log(conf, ctx)
if batch_processor_manager:add_entry(conf, entry) then
return
end
-
+ local labels = conf.log_labels
+ -- parsing possible variables in label value
+ for key, value in pairs(labels) do
+ local new_val, err, n_resolved = core.utils.resolve_var(value, ctx.var)
+ if not err and n_resolved > 0 then
+ labels[key] = new_val
+ end
+ end
Review Comment:
Keep those blank lines to maintain readability.
--
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: notifications-unsubscribe@apisix.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org