$ show cloudflare/lua-resty-logger-socket
lua-resty-logger-socket is a Lua library for Nginx (using ngx_lua) that provides nonblocking remote logging. It buffers log messages in memory and sends them to a remote log server (via TCP, UDP, or Unix domain socket) when the buffer reaches a configurable size or when manually flushed. The library implements efficient buffering with two-level buffers to minimize string concatenation, buffer reuse to prevent memory leaks, retry logic for connection and send failures, periodic flushing, and graceful handling of Nginx worker shutdown to flush remaining logs. It supports SSL with SNI and certificate verification.
The LLM identified 1 files worth highlighting for reuse:
This module provides a nonblocking remote logging library for Nginx using the ngx_lua cosocket API. It implements efficient buffering with two-level buffers to minimize string concatenation, buffer reuse to prevent memory leaks, retry logic for connection and send failures, periodic flushing, and graceful handling of Nginx worker shutdown to flush remaining logs. It supports TCP, UDP, Unix domain sockets, and SSL with SNI and certificate verification.