Skip to content

Commit

Permalink
doc: add short introduction about how to change log level (#1484)
Browse files Browse the repository at this point in the history
  • Loading branch information
eiyouwang authored Apr 24, 2020
1 parent c351b38 commit a5cb1be
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
12 changes: 12 additions & 0 deletions FAQ.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
12 changes: 12 additions & 0 deletions FAQ_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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的日志了。

0 comments on commit a5cb1be

Please sign in to comment.