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.

Get Mastering NGINX - Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.