Opened 3 years ago

Closed 2 years ago

#1450 closed enhancement (fixed)

Allow for unescaped access logs

Reported by: calind@… Owned by:
Priority: minor Milestone:
Component: other Version: 1.13.x
Keywords: Cc:
uname -a:
nginx -V: nginx version: nginx/1.12.2
built with OpenSSL 1.0.2n 7 Dec 2017
TLS SNI support enabled
configure arguments: --prefix=/usr/share/nginx --with-cc-opt=-I../modules/openssl-1.0.2n/include --with-ld-opt=-L../modules/openssl-1.0.2n --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-client-body-temp-path=/var/lib/nginx/body --http-fastcgi-temp-path=/var/lib/nginx/fastcgi --http-log-path=/var/log/nginx/access.log --http-proxy-temp-path=/var/lib/nginx/proxy --http-scgi-temp-path=/var/lib/nginx/scgi --http-uwsgi-temp-path=/var/lib/nginx/uwsgi --lock-path=/var/lock/nginx.lock --pid-path=/run/nginx.pid --with-pcre-jit --with-debug --with-http_addition_module --with-http_dav_module --with-http_geoip_module --with-http_gzip_static_module --with-http_gunzip_module --with-http_image_filter_module --with-http_realip_module --with-http_stub_status_module --with-http_ssl_module --with-http_sub_module --with-http_xslt_module --with-http_v2_module --with-ipv6 --with-openssl=/build/nginx-ptzNR_/nginx-1.12.2/debian/modules/openssl-1.0.2n --add-module=/build/nginx-ptzNR_/nginx-1.12.2/debian/modules/nginx-devel-kit --add-module=/build/nginx-ptzNR_/nginx-1.12.2/debian/modules/nginx-echo --add-module=/build/nginx-ptzNR_/nginx-1.12.2/debian/modules/nginx-lua --add-module=/build/nginx-ptzNR_/nginx-1.12.2/debian/modules/nginx-cache-purge

Description

Currently there are 2 access.log escaping formats (one is the older, default and the other is json).

This patch adds a third escape format (none) which doesn't apply any kind of escaping.

Attachments (1)

log_no_escape.patch (4.4 KB ) - added by calind@… 3 years ago.

Download all attachments as: .zip

Change History (4)

by calind@…, 3 years ago

Attachment: log_no_escape.patch added

comment:1 by Maxim Dounin, 3 years ago

Please see http://nginx.org/en/docs/contributing_changes.html for recommendations on how to contribute changes to nginx. Thank you.

comment:2 by Vladimir Homutov <vl@…>, 2 years ago

In 7223:265c29b0b8b8/nginx:

Access log: support for disabling escaping (ticket #1450).

Based on patches by Johannes Baiter <johannes.baiter@…>
and Calin Don.

comment:3 by vl, 2 years ago

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.