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

fix(plugins): change log level from error to info when restarting external plugin instance #8652

Merged
merged 3 commits into from
May 25, 2022
Merged
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
4 changes: 2 additions & 2 deletions kong/runloop/plugin_servers/mp_rpc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -329,12 +329,12 @@ function Rpc:handle_event(plugin_name, conf, phase)
local _, err = bridge_loop(self, instance_id, phase)

if err then
kong.log.err(err)

if string.match(err:lower(), "no plugin instance") then
fffonion marked this conversation as resolved.
Show resolved Hide resolved
kong.log.warn(err)
self.reset_instance(plugin_name, conf)
return self:handle_event(plugin_name, conf, phase)
end
kong.log.err(err)
end
end

Expand Down
8 changes: 4 additions & 4 deletions kong/runloop/plugin_servers/pb_rpc.lua
Original file line number Diff line number Diff line change
Expand Up @@ -394,13 +394,13 @@ function Rpc:handle_event(plugin_name, conf, phase)
event_name = phase,
}, true)
if not res or res == "" then
kong.log.err(err)
if string.match(err:lower(), "no plugin instance")
or string.match(err:lower(), "closed") then

if string.match(err:lower(), "no plugin instance")
or string.match(err:lower(), "closed") then
kong.log.warn(err)
self.reset_instance(plugin_name, conf)
return self:handle_event(plugin_name, conf, phase)
end
kong.log.err(err)
end
end

Expand Down