Skip to content

Commit

Permalink
remove error log
Browse files Browse the repository at this point in the history
  • Loading branch information
chobits committed Oct 9, 2024
1 parent 41ef147 commit 477f6cb
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions kong/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -652,17 +652,19 @@ function Kong.init()
-- duplicated seeds.
math.randomseed()

ngx.log(ngx.ERR, "kong.default_workspace: 1:", tostring(kong.default_workspace))
-- ngx.log(ngx.ERR, "kong.default_workspace: 1:", tostring(kong.default_workspace))

kong_global.init_pdk(kong, config)
instrumentation.init(config)
wasm.init(config)
ngx.log(ngx.ERR, "kong.default_workspace: 1:", tostring(kong.default_workspace))
-- ngx.log(ngx.ERR, "kong.default_workspace: 1:", tostring(kong.default_workspace))

local db = assert(DB.new(config))
assert(db.workspaces)
instrumentation.db_query(db.connector)
assert(db:init_connector())
ngx.log(ngx.ERR, "kong.default_workspace: 1:", tostring(kong.default_workspace))
-- ngx.log(ngx.ERR, "kong.default_workspace: 1:", tostring(kong.default_workspace))
assert(db.workspaces)

-- check state of migration only if there is an external database
if not is_dbless(config) then
Expand All @@ -683,18 +685,16 @@ function Kong.init()
end
end
end
assert(db.workspaces)

assert(db:connect())
ngx.log(ngx.ERR, "kong.default_workspace: 1:", tostring(kong.default_workspace))

kong.db = db

if config.proxy_ssl_enabled or config.stream_ssl_enabled then
certificate.init()
end

ngx.log(ngx.ERR, "kong.default_workspace: 1:", tostring(kong.default_workspace))

if is_http_module and (is_data_plane(config) or is_control_plane(config))
then
kong.clustering = require("kong.clustering").new(config)
Expand Down Expand Up @@ -747,9 +747,9 @@ function Kong.init()

else
local default_ws = db.workspaces:select_by_name("default")
ngx.log(ngx.ERR, "kong.default_workspace: 1:", tostring(kong.default_workspace), " :", require("inspect")(default_ws))
-- ngx.log(ngx.ERR, "kong.default_workspace: 1:", tostring(kong.default_workspace), " :", require("inspect")(default_ws))
kong.default_workspace = default_ws and default_ws.id
ngx.log(ngx.ERR, "kong.default_workspace: 2:", tostring(kong.default_workspace))
-- ngx.log(ngx.ERR, "kong.default_workspace: 2:", tostring(kong.default_workspace))

local ok, err = runloop.build_plugins_iterator("init")
if not ok then
Expand Down

0 comments on commit 477f6cb

Please sign in to comment.