[PATCH] New directive and variable to log module

Fabiano Furtado fabianofurtado at gmail.com
Sat Apr 18 21:40:43 UTC 2026


Dear freenginx developers,

I would appreciate it if you could take a look at this patch and
provide your feedback or suggestions for improvements, or let me know
if you think it would be a valuable addition to the project.

This patch introduces the new "log_tag" directive to freenginx, which
allows you to define a custom tag for each http, server or location
block. This tag is then referenced using the "$tag" variable within
the "log_format" directive, making it easier to filter and match logs,
especially in configurations with many location blocks or complex ones
using regular expressions.

As an alternative, the directive and variable could be named as:
  * "log_label" / "$label"
  * "log_id" / "$id"

Thanks in advance.
Fabiano Furtado
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ngx_http_log_module.c.patch
Type: text/x-patch
Size: 5958 bytes
Desc: not available
URL: <http://freenginx.org/pipermail/nginx-devel/attachments/20260418/1a9fa8a9/attachment.bin>


More information about the nginx-devel mailing list