You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by sp...@apache.org on 2022/12/28 03:47:31 UTC

[apisix] branch master updated: fix: inspect plugin log level and module path (#8574)

This is an automated email from the ASF dual-hosted git repository.

spacewander pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/apisix.git


The following commit(s) were added to refs/heads/master by this push:
     new 9115f51cd fix: inspect plugin log level and module path (#8574)
9115f51cd is described below

commit 9115f51cd3d194ea82c489bfaca3377f6828642e
Author: jinhua luo <ho...@163.com>
AuthorDate: Wed Dec 28 11:47:27 2022 +0800

    fix: inspect plugin log level and module path (#8574)
---
 apisix/inspect/init.lua           | 2 +-
 docs/en/latest/plugins/inspect.md | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/apisix/inspect/init.lua b/apisix/inspect/init.lua
index a33c30ec3..649532d1a 100644
--- a/apisix/inspect/init.lua
+++ b/apisix/inspect/init.lua
@@ -65,7 +65,7 @@ local function setup_hooks(file)
         for _, hook in ipairs(dbg.hooks()) do
             table_insert(hooks, hook.key)
         end
-        core.log.info("set hooks: err: ", err, ", hooks: ", core.json.delay_encode(hooks))
+        core.log.warn("set hooks: err: ", err, ", hooks: ", core.json.delay_encode(hooks))
     end
 end
 
diff --git a/docs/en/latest/plugins/inspect.md b/docs/en/latest/plugins/inspect.md
index fad20a1bb..f75064fda 100644
--- a/docs/en/latest/plugins/inspect.md
+++ b/docs/en/latest/plugins/inspect.md
@@ -54,7 +54,7 @@ The breakpoint could be at any position within the function. The function could
 
 ## API to define hook in hooks file
 
-### require("resty.inspect.dbg").set_hook(file, line, func, filter_func)
+### require("apisix.inspect.dbg").set_hook(file, line, func, filter_func)
 
 The breakpoint is specified by `file` (full qualified or short file name) and the `line` number.
 
@@ -127,7 +127,7 @@ curl http://127.0.0.1:9180/apisix/admin/routes/test_limit_req -H 'X-API-KEY: edd
 # Note that the breakpoint is associated with the line number,
 # so if the Lua code changes, you need to adjust the line number in the hooks file
 cat <<EOF >/usr/local/apisix/example_hooks.lua
-local dbg = require "resty.inspect.dbg"
+local dbg = require "apisix.inspect.dbg"
 
 dbg.set_hook("limit-req.lua", 88, require("apisix.plugins.limit-req").access, function(info)
     ngx.log(ngx.INFO, debug.traceback("foo traceback", 3))