diff --git a/FAQ.md b/FAQ.md index 166a8b04731a..4b56fce0355d 100644 --- a/FAQ.md +++ b/FAQ.md @@ -160,3 +160,15 @@ https://developer.apple.com/download/more/. This is an OS incompatible issue, you could fix by these two steps 1. `brew edit openresty/brew/openresty` 1. add `\ -fno-stack-check` in with-luajit-xcflags line. + +## How to change the log level? + +The default log level for APISIX is `warn`. However You can change the log level to `info` if you want to trace the messages print by `core.log.info`. + +Steps: + +1. Modify the parameter `error_log_level: "warn"` to `error_log_level: "info"` in conf/config.yaml + +2. Restart APISIX + +Now you can trace the info level log in logs/error.log. diff --git a/FAQ_CN.md b/FAQ_CN.md index 3775093bc825..8d1e52824b51 100644 --- a/FAQ_CN.md +++ b/FAQ_CN.md @@ -111,3 +111,15 @@ curl -i http://127.0.0.1:9080/apisix/admin/routes/2 -H 'X-API-KEY: edd1c9f034335 更多的 lua-resty-radixtree 匹配操作,可查看操作列表: https://github.com/iresty/lua-resty-radixtree#operator-list + +## 如何修改日志等级 + +默认的APISIX日志等级为`warn`,如果需要查看`core.log.info`的打印结果需要将日志等级调整为`info`。 + +具体步骤: + +1、修改conf/config.yaml中的nginx log配置参数`error_log_level: "warn"`为`error_log_level: "info"`。 + +2、重启APISIX + +之后便可以在logs/error.log中查看到info的日志了。