【发布时间】:2015-05-22 05:02:21
【问题描述】:
我是 Nginx 和 Lua 的新手 -
我一直在尝试在 nginx.conf 文件中的 Lua 脚本中对变量进行简单的日志记录,但我看不到输出。
我在 content_by_lua 中使用 ngx.log conf文件里面
location /test {
content_by_lua '
ngx.log(ngx.STDERR, "Usage variable " .. ngx.var.usage);
';
}
在使用 curl ping 本地主机时,我看不到任何输出(在服务器、响应或错误日志文件上)
我在哪里可以看到这个输出? 感谢您在此问题上的任何帮助
【问题讨论】: