Opened 10 years ago

Closed 10 years ago

#599 closed defect (worksforme)

custom log format on default log doesn't work properly

Reported by: Tom Keyser Owned by:
Priority: minor Milestone:
Component: nginx-core Version: 1.7.x
Keywords: Cc:
uname -a: Linux www05.crwenews.org 2.6.18-371.4.1.el5PAE #1 SMP Thu Jan 30 06:51:58 EST 2014 i686 i686 i386 GNU/Linux
nginx -V: nginx version: nginx/1.6.0
built by gcc 4.1.2 20080704 (Red Hat 4.1.2-54)
TLS SNI support disabled
configure arguments: --prefix=/etc/nginx --sbin-path=/usr/sbin/nginx --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --pid-path=/var/run/nginx.pid --lock-path=/var/run/nginx.lock --http-client-body-temp-path=/var/cache/nginx/client_temp --http-proxy-temp-path=/var/cache/nginx/proxy_temp --http-fastcgi-temp-path=/var/cache/nginx/fastcgi_temp --http-uwsgi-temp-path=/var/cache/nginx/uwsgi_temp --http-scgi-temp-path=/var/cache/nginx/scgi_temp --user=nginx --group=nginx --with-http_ssl_module --with-http_realip_module --with-http_addition_module --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_random_index_module --with-http_secure_link_module --with-http_stub_status_module --with-http_auth_request_module --with-mail --with-mail_ssl_module --with-file-aio --with-ipv6 --with-cc-opt='-O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4 -m32 -march=i386 -mtune=generic -fasynchronous-unwind-tables'

Description

When changing the log format on the default log file you end up with 2 log entries.

log_format timed_host '$remote_addr - $remote_user [$time_local] '

'"$request" $status $body_bytes_sent '
'"$http_referer" "$http_user_agent" $request_time "$server_name"';


access_log /var/log/nginx/access.log timed_host;

71.50.67.211 - - [30/Jul/2014:08:16:14 -0700] "GET /wp-content/plugins/jetpack/modules/contact-formimages/grunion-menu.png HTTP/1.1" 200 157 "http://snelling.crwe-pr.com/wp-admin/post-new.php?post_type=page" "Mozilla/5.0 (Windows NT 6.0; rv:31.0) Gecko/20100101 Firefox/31.0 AlexaToolbar/alxf-2.19"
71.50.67.211 - - [30/Jul/2014:08:16:14 -0700] "GET /wp-content/plugins/wp-symposium
images/logo_admin_icon.png HTTP/1.1" 200 877 "http://snelling.crwe-pr.com/wp-admin/post-new.php?post_type=page" "Mozilla/5.0 (Windows NT 6.0; rv:31.0) Gecko/20100101 Firefox/31.0 AlexaToolbar/alxf-2.19" 0.000 "snelling.crwe-pr.com"

Change History (2)

comment:1 by Maxim Dounin, 10 years ago

Please provide full configuration you are able to reproduce the problem with. From the symptoms described, it looks like you have two access_log directives, and there is no surprise both work.

comment:2 by Maxim Dounin, 10 years ago

Resolution: worksforme
Status: newclosed

Feedback timeout.

Note: See TracTickets for help on using tickets.