Opened 5 years ago

Closed 5 years ago

#1925 closed task (invalid)

Ability to change the time format of the log.

Reported by: IlyaIndigo@… Owned by:
Priority: minor Milestone: nginx-1.17
Component: nginx-module Version: 1.17.x
Keywords: log Cc: IlyaIndigo@…
uname -a: Linux gricargo.com 5.4.10-1-default #1 SMP Thu Jan 9 15:45:45 UTC 2020 (556a6fe) x86_64 x86_64 x86_64 GNU/Linux
nginx -V: nginx version: nginx/1.17.7
built by gcc 9.2.1 20191209 [gcc-9-branch revision 279114] (SUSE Linux)
built with OpenSSL 1.1.1d 10 Sep 2019
TLS SNI support enabled
configure arguments: --prefix=/usr/ --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/run/nginx.pid --lock-path=/run/nginx.lock --http-client-body-temp-path=/var/lib/nginx/tmp/ --http-proxy-temp-path=/var/lib/nginx/proxy/ --http-fastcgi-temp-path=/var/lib/nginx/fastcgi/ --http-uwsgi-temp-path=/var/lib/nginx/uwsgi/ --http-scgi-temp-path=/var/lib/nginx/scgi/ --user=nginx --group=nginx --without-select_module --without-poll_module --with-threads --with-file-aio --with-ipv6 --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_addition_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_geoip_module=dynamic --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_auth_request_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_slice_module --with-http_stub_status_module --with-http_perl_module=dynamic --with-perl=/usr/bin/perl --with-mail=dynamic --with-mail_ssl_module --with-stream=dynamic --with-stream_ssl_module --with-stream_realip_module --with-stream_geoip_module=dynamic --with-stream_ssl_preread_module --with-pcre --with-pcre-jit --with-libatomic --with-compat --add-module=nginx_upstream_check_module-0.3.0 --add-dynamic-module=ngx-fancyindex-0.4.2 --add-dynamic-module=headers-more-nginx-module-0.33 --add-dynamic-module=nginx-rtmp-module-1.2.1 --with-cc-opt='-O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -Werror=return-type -flto=auto -g -fPIC -D_GNU_SOURCE' --with-ld-opt='-Wl,-z,relro,-z,now -pie'

Description

Ability to change the time format of the log.
I would like to be able to change the time format of the log.
For example, instead of "17/Jan/2020:13:37:08 +0300" specify "2020-01-17 13:34:08".

Change History (4)

comment:1 by Maxim Dounin, 5 years ago

Resolution: invalid
Status: newclosed

Log format can be changed by using the log_format directive.

comment:2 by IlyaIndigo@…, 5 years ago

For time format isset only 2 variables $time_local and $time_iso8601
Please give an example, how can I specify time format to it "2020-01-17 13:34:08"?

comment:3 by IlyaIndigo@…, 5 years ago

Resolution: invalid
Status: closedreopened

comment:4 by Maxim Dounin, 5 years ago

Resolution: invalid
Status: reopenedclosed

For questions, consider using support options available.

Note: See TracTickets for help on using tickets.