Logging with Lua
To give what we learned in this chapter a practical application, let's add some request logging with Lua. Lua works well for this as we're able to keep track of each request in a shared table. The data stored in this table can be represented in any way we choose. The code is available at https://github.com/mtourne/nginx_log_by_lua.