membphis commented on a change in pull request #1260: [WIP] Kafka Logger.
URL: https://github.com/apache/incubator-apisix/pull/1260#discussion_r395394615
##########
File path: lua/apisix/plugins/kafka-logger.lua
##########
@@ -56,9 +55,12 @@ local function log(premature, conf, log_message)
return
end
- local broker_list = {
- { host = conf.broker_host, port = conf.port }
- }
+ if #conf.broker_list == 0 then
Review comment:
the `conf. broker_list` is a hash object, we need to use `table.nkeys` to
fetch the number of attributes.
`#` is useful for array tables.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services