小弟经验不足,不知道如何使用ngx.log(ngx.DEBUG, ...).
我的用例:
conf:
http {
error_log /home/me/app/nginx/openresty_error.log debug;
lua_code_cache off;
server {
listen 8090 so_keepalive=2s:2s:8;
location /t {
content_by_lua_file lua/t.lua;
}
}
}
lua/t.lua:
ngx.say('ok')
ngx.log(ngx.DEBUG, 't...')
ngx.say(ngx.config.debug, ':t...')
ngx.say('bye bye')
当我curl
http://127.0.0.1:8090/t后,就是在openresty_error.log文件中看不见日志信息,输出的ngx.config.debug变量的确为tue。
我的openresty是1.4.2.9版本,使用了--with-debug编译.
难道我只能使用ngx.CRIT来输出日志?我哪里犯了错?
--
with kind regards