Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hotfix(logs) reduce noise when consuming Admin API #1781

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions kong/api/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,8 @@ local function insert_405(routes)
return routes
end

ngx.log(ngx.DEBUG, "Loading Admin API endpoints")

-- Load core routes
for _, v in ipairs({"kong", "apis", "consumers", "plugins", "cache", "cluster" }) do
local routes = require("kong.api.routes."..v)
Expand All @@ -118,10 +120,10 @@ if singletons.configuration and singletons.configuration.plugins then
for k in pairs(singletons.configuration.plugins) do
local loaded, mod = utils.load_module_if_exists("kong.plugins."..k..".api")
if loaded then
ngx.log(ngx.DEBUG, "Loading API endpoints for plugin: "..k)
ngx.log(ngx.DEBUG, "Loading API endpoints for plugin: ", k)
attach_routes(insert_405(mod))
else
ngx.log(ngx.DEBUG, "No API endpoints loaded for plugin: "..k)
ngx.log(ngx.DEBUG, "No API endpoints loaded for plugin: ", k)
end
end
end
Expand Down
1 change: 0 additions & 1 deletion kong/templates/nginx_kong.lua
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,6 @@ server {
ngx.exit(204)
end

ngx.log(ngx.DEBUG, 'Loading Admin API endpoints')
require('lapis').serve('kong.api')
}
}
Expand Down
1 change: 0 additions & 1 deletion spec/fixtures/custom_nginx.template
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ http {
ngx.exit(204)
end

ngx.log(ngx.DEBUG, 'Loading Admin API endpoints')
require('lapis').serve('kong.api')
}
}
Expand Down