We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
希望提供终端log输出的功能。
The text was updated successfully, but these errors were encountered:
Hi,
在 src/framework/debug.lua 文件中,有这样几个函数:
src/framework/debug.lua
if CCLuaLog then io.output():setvbuf('no') elseif ngx and ngx.log then print = function(...) local arg = {...} for k,v in pairs(arg) do arg[k] = tostring(v) end ngx.log(ngx.ERR, table.concat(arg, "\t")) end end echo = print function echoError(fmt, ...) echoLog("ERR", fmt, ...) print(debug.traceback("", 2)) end function echoInfo(fmt, ...) echoLog("INFO", fmt, ...) end function echoLog(tag, fmt, ...) echo(string.format("[%s] %s", string.upper(tostring(tag)), string.format(tostring(fmt), ...))) end
你可以使用它们输出你想要的内容,并且在安装后的的Quick Server路径下的 openresty/nginx/log/error.log里看到内容:)
openresty/nginx/log/error.log
Sorry, something went wrong.
加入 FAQ
No branches or pull requests
希望提供终端log输出的功能。
The text was updated successfully, but these errors were encountered: