I have the error code below. How can I write to the error log, or to anywhere, all the variables that were found inside LUA just before the error happened? My LUA code at that moment was
new_file = path.join("/usr/src/routes/", path.basename(file))
I just uploaded a new file. How can I see the content of the variable "file"?
I installed the module path with "/usr/local/bin/luarocks install path"
Error
/usr/local/share/lua/5.1/lapis/application.lua:440: /usr/local/openresty/nginx/app.lua:1366: attempt to call field 'join' (a nil value)
stack traceback:
/usr/local/openresty/nginx/app.lua: in function </usr/local/openresty/nginx/app.lua:1346>
Traceback
stack traceback:
[C]: in function 'error'
/usr/local/share/lua/5.1/lapis/application.lua:440: in function 'handler'
/usr/local/share/lua/5.1/lapis/application.lua:147: in function 'resolve'
/usr/local/share/lua/5.1/lapis/application.lua:184: in function </usr/local/share/lua/5.1/lapis/application.lua:182>
[C]: in function 'xpcall'
/usr/local/share/lua/5.1/lapis/application.lua:190: in function 'dispatch'
/usr/local/share/lua/5.1/lapis/nginx.lua:231: in function 'serve'
content_by_lua(nginx.conf:137):4: in main chunk