Skip to content

Commit

Permalink
style(tools/emmy_debugger): prefer vararg-style for ngx.log (#13185)
Browse files Browse the repository at this point in the history
  • Loading branch information
chronolaw authored Jun 10, 2024
1 parent fd994be commit 49f7b44
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions kong/tools/emmy_debugger.lua
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ local function find_source(path)
end
end

ngx.log(ngx.ERR, "source file " .. path .. " not found in " .. env_prefix .. "_EMMY_DEBUGGER_SOURCE_PATH")
ngx.log(ngx.ERR, "source file ", path, " not found in ", env_prefix, "_EMMY_DEBUGGER_SOURCE_PATH")

return path
end
Expand Down Expand Up @@ -71,24 +71,24 @@ local function init(config_)
end

if not pl_path.isabs(debugger) then
ngx.log(ngx.ERR, env_prefix .. "_EMMY_DEBUGGER (" .. debugger .. ") must be an absolute path")
ngx.log(ngx.ERR, env_prefix, "_EMMY_DEBUGGER (", debugger, ") must be an absolute path")
return
end
if not pl_path.exists(debugger) then
ngx.log(ngx.ERR, env_prefix .. "_EMMY_DEBUGGER (" .. debugger .. ") file not found")
ngx.log(ngx.ERR, env_prefix, "_EMMY_DEBUGGER (", debugger, ") file not found")
return
end
local ext = pl_path.extension(debugger)
if ext ~= ".so" and ext ~= ".dylib" then
ngx.log(ngx.ERR, env_prefix .. "_EMMY_DEBUGGER (" .. debugger .. ") must be a .so (Linux) or .dylib (macOS) file")
ngx.log(ngx.ERR, env_prefix, "_EMMY_DEBUGGER (", debugger, ") must be a .so (Linux) or .dylib (macOS) file")
return
end
if ngx.worker.id() > 0 and not multi_worker then
ngx.log(ngx.ERR, env_prefix .. "_EMMY_DEBUGGER is only supported in the first worker process, suggest setting KONG_NGINX_WORKER_PROCESSES to 1")
ngx.log(ngx.ERR, env_prefix, "_EMMY_DEBUGGER is only supported in the first worker process, suggest setting KONG_NGINX_WORKER_PROCESSES to 1")
return
end

ngx.log(ngx.NOTICE, "loading EmmyLua debugger " .. debugger)
ngx.log(ngx.NOTICE, "loading EmmyLua debugger ", debugger)
ngx.log(ngx.WARN, "The EmmyLua integration for Kong is a feature solely for your convenience during development. Kong assumes no liability as a result of using the integration and does not endorse it’s usage. Issues related to usage of EmmyLua integration should be directed to the respective project instead.")

local dbg = load_debugger(debugger)
Expand Down

1 comment on commit 49f7b44

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bazel Build

Docker image available kong/kong:49f7b44c8ef5f9db1c9c62701a79437dfc116c16
Artifacts available https://github.com/Kong/kong/actions/runs/9453787432

Please sign in to comment.