Skip to content

Commit

Permalink
hotfix(admin) reduce logs noise when consuming Admin API
Browse files Browse the repository at this point in the history
  • Loading branch information
subnetmarco authored and thibaultcha committed Oct 28, 2016
1 parent 573577b commit 53f7bc3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
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 @@ -127,7 +127,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

0 comments on commit 53f7bc3

Please sign in to comment.