spacewander commented on a change in pull request #2309:
URL: https://github.com/apache/apisix/pull/2309#discussion_r503644982



##########
File path: apisix/plugins/http-logger.lua
##########
@@ -117,12 +139,52 @@ local function send_http_data(conf, log_message)
 end
 
 
-function _M.log(conf)
-    local entry = log_util.get_full_log(ngx, conf)
+local function gen_log_format(metadata)
+    local log_format = {}
+    if metadata == nil then
+        return log_format
+    end
+
+    for k, var_name in pairs(metadata.value.log_format) do
+        if var_name:sub(1, 1) == "$" then

Review comment:
       `var_name:byte(1, 1)` is already enough?




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to