From 76564d6de03e2885987fb95433e9fddbc536c239 Mon Sep 17 00:00:00 2001 From: chronolaw Date: Tue, 5 Nov 2024 13:43:43 +0800 Subject: [PATCH] clean logs --- kong/clustering/rpc/manager.lua | 4 ++-- kong/clustering/services/sync/hooks.lua | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/kong/clustering/rpc/manager.lua b/kong/clustering/rpc/manager.lua index 44f3c6d43f1f..6ab7696fd660 100644 --- a/kong/clustering/rpc/manager.lua +++ b/kong/clustering/rpc/manager.lua @@ -182,7 +182,7 @@ function _M:call(node_id, method, ...) if res == "local" then res, err = self:_local_call(node_id, method, params) - ngx_log(ngx_DEBUG, "[rpc] ", method, err and " failed" or " succeeded") + ngx_log(ngx_DEBUG, "[rpc] ", method, " err: ", err) if not res then return nil, err @@ -199,7 +199,7 @@ function _M:call(node_id, method, ...) local ok, err = fut:wait(5) - ngx_log(ngx_DEBUG, "[rpc] ", method, err and " failed" or " succeeded") + ngx_log(ngx_DEBUG, "[rpc] ", method, " err: ", err) if err then return nil, err diff --git a/kong/clustering/services/sync/hooks.lua b/kong/clustering/services/sync/hooks.lua index 80d892ced627..654ce74f1c59 100644 --- a/kong/clustering/services/sync/hooks.lua +++ b/kong/clustering/services/sync/hooks.lua @@ -114,9 +114,10 @@ end -- only control plane has these delta operations function _M:register_dao_hooks() local function is_db_export(name) - ngx_log(ngx_DEBUG, "[kong.sync.v2] name: ", name, " db_export: ", kong.db[name].schema.db_export) - local db_export = kong.db[name].schema.db_export + + ngx_log(ngx_DEBUG, "[kong.sync.v2] name: ", name, " db_export: ", db_export) + return db_export == nil or db_export == true end